note 20275 added to zend.structure.function-block
| From: | k at ailis dot de | Date: | Thu, 28 Mar 2002 10:57:21 +0000 |
| Subject: | note 20275 added to zend.structure.function-block | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28328@lists.php.net to get a copy of this message | ||
Because it is not explained how the arg_types parameter works, I'll try to explain it myself:
The arg_types parameter is an array of bytes. The first byte marks how many arg_type-specifiers
follows. There are the following macros which can be used to regulate the reference forcing and I
interprete them like this (No guarentee):
BYREF_NONE = Force passing by value
BYREF_FORCE = Force passing by reference
BYREF_ALLOW = Allow passing by reference
BYREF_FORCE_REST = ???
Commonly the arg_types parameter is used like this:
static unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
ZEND_FE(foobar, third_argument_force_ref)
Note that the first element in the array does NOT specify how many arguments the function is
expecting, only how many arg_type-Specifiers follows. Checking of the number of arguments has to be
done in the function body itself (i.E. by using the zend_parse_parameters() function)
--
http://www.php.net/manual/en/zend.structure.function-block.php
http://master.php.net/manage/user-notes.php?action=edit+20275
http://master.php.net/manage/user-notes.php?action=delete+20275
http://master.php.net/manage/user-notes.php?action=reject+20275