note 20275 deleted from internals2.ze1.zendapi by cmb

From: Date: Sun, 10 Jan 2021 13:25:25 +0000
Subject: note 20275 deleted from internals2.ze1.zendapi by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-216112@lists.php.net to get a copy of this message
Note Submitter: k at ailis dot de ---- 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)

« previous php.notes (#216112) next »