1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 21:41:22 +02:00
Files
archived-php-src/Zend
Zeev Suraski f8bbafd604 ntroduce infrastructure for supplying information about arguments,
including:

- Whether or not to pass by ref (replaces the old arg_types, with arg_info)
- Argument name (for future use, maybe introspection)
- Class/Interface name (for type hints)
- If a class/interface name is available, whether to allow a null instance

Both user and builtin functions share the same data structures.

To declare a builtin function that expects its first arg to be an instance
of class 'Person', its second argument as a regular arg, and its third by
reference, use:

ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0)
    ZEND_ARG_OBJ_INFO(0, someone, Person, 1)
    ZEND_ARG_PASS_INFO(0)
    ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();

and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family
of macros.

The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref.

The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat
the arguments for which there's no explicit information as pass by reference
or not.
The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values.
2003-08-03 17:40:44 +00:00
..
2003-03-18 12:06:09 +00:00
2003-07-29 17:56:50 +00:00
1999-10-04 15:20:12 +00:00
2003-08-03 00:30:27 +00:00
2002-11-15 14:30:40 +00:00
2003-02-18 09:51:21 +00:00
2002-12-31 15:59:15 +00:00
2003-07-16 08:48:22 +00:00
2003-06-29 09:40:23 +00:00
2003-08-03 08:21:08 +00:00
2003-07-23 08:58:46 +00:00
2003-07-23 08:56:34 +00:00
2003-07-27 12:25:50 +00:00
2003-06-10 22:39:29 +00:00
1999-04-07 18:10:10 +00:00