diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-02-19 13:28:10 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-02-19 13:28:10 +0100 |
commit | 54098cf044025ec5965b8ea9c84750f9631d85b6 (patch) | |
tree | ed0ef32b379c0cdfe20fcafc5b27c4488732fe90 /README.PARAMETER_PARSING_API | |
parent | 8572aeb0703107705fc7dde35961cd6a5f89c0c8 (diff) | |
download | php-54098cf044025ec5965b8ea9c84750f9631d85b6.tar.gz |
Imported Upstream version 5.5.0~alpha4upstream/5.5.0_alpha4
Diffstat (limited to 'README.PARAMETER_PARSING_API')
-rw-r--r-- | README.PARAMETER_PARSING_API | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/README.PARAMETER_PARSING_API b/README.PARAMETER_PARSING_API index 927e48188..edcee0f2e 100644 --- a/README.PARAMETER_PARSING_API +++ b/README.PARAMETER_PARSING_API @@ -28,6 +28,17 @@ Both functions return SUCCESS or FAILURE depending on the result. The auto-conversions are performed as necessary. Arrays, objects, and resources cannot be auto-converted. +PHP 5.5 includes a new function: + +int zend_parse_parameter(int flags, int arg_num TSRMLS_DC, zval **arg, const char *spec, ...); + +This function behaves like zend_parse_parameters_ex() except that instead of +reading the arguments from the stack, it receives a single zval to convert +(passed with double indirection). The passed zval may be changed in place as +part of the conversion process. + +See also https://wiki.php.net/rfc/zpp_improv#expose_zend_parse_arg_as_zend_parse_parameter + Type specifiers --------------- @@ -65,9 +76,13 @@ Type specifiers will not be touched by the parsing function if they are not passed to it. / - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows - ! - the parameter it follows can be of specified type or NULL (applies - to all specifiers except for 'b', 'l', and 'd'). If NULL is passed, the - results pointer is set to NULL as well. + ! - the parameter it follows can be of specified type or NULL. If NULL is + passed and the output for such type is a pointer, then the output + pointer is set to a native NULL pointer. + For 'b', 'l' and 'd', an extra argument of type zend_bool* must be + passed after the corresponding bool*, long* or double* arguments, + respectively. A non-zero value will be written to the zend_bool iif a + PHP NULL is passed. Note on 64bit compatibility |