Can you spot the bug?

php.internals

Michael B Allen

20 years ago
Can anyone spot the bug in following code from the tutorial [1]? PHP_FUNCTION(hello_dump) { zval *uservar; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", uservar) == FAILURE) { RETURN_NULL(); } Mike [1] http://www.zend.com/php/internals/extension-writing2.php#Heading3
-- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/

Pierre Joye

20 years ago
On 6/10/06, Michael B Allen <mba2000@ioplex.com> wrote:
> Can anyone spot the bug in following code from the tutorial [1]? > > PHP_FUNCTION(hello_dump) > { > zval *uservar; > > if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", uservar) == FAILURE) {
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &uservar (it takes a ptr ptr) --Pierre