>
> What can I do in my extension to unset or clear the variable so that it
> doesn’t have to be done in the PHP script?


> if (!PZVAL_IS_REF(Arr))
> {
>    zend_error(E_ERROR, "The Arr parameter must be passed by reference");
                ^^^^^^^
Don't use E_ERROR in an extension unless it would be dangerous for
execution to continue (eg: crash iminent); use E_WARNING instead.

>    RETURN_NULL();
> }

SEPARATE_ZVAL(Arr);

> array_init(Arr);
>
> if (add_assoc_string(Arr, (char *) szFieldName, (char *) szValue, 1) ==
> FAILURE) {
> . . .
> }

Hope that helps,

--Wez.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to