Receiving arguments by ref...

From: Date: Wed, 30 Jun 2004 00:57:26 +0000
Subject: Receiving arguments by ref...
Groups: php.internals 
Request: Send a blank email to internals+get-10841@lists.php.net to get a copy of this message
i've read the Zend API docs at php.net and they seem dated, but i haven't found anything that deals with byref parameters using the new parameter parsing API. so i have a few questions ... 1. Is it sufficient to have an zend_arg_info structure declaring that a parameter is byref, and parse the value as a zval ? e.g. static ZEND_BEGIN_ARG_INFO(arginfo_test, 0) ZEND_ARG_INFO(1, name) ZEND_END_ARG_INFO(); and then in the function... PHP_FUNCTION(test) { zval *name = null; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &name) == FAILURE) { return; } zval_dtor(name); ZVAL_STRING(name, "Hello World", 1); } or do we need to use "z/" as a parameter specifier. 2. what does the "Z" (capital z) specifier to zend_parse_parameters do 3. am i stuck using the old parameter fetching API ? l0t3k

« previous php.internals (#10841) next »