com php-src: [ci skip] Document zend_parse_parameters_non e(): README.PARAMETER_PARSING_API
| From: | Christoph Michael Becker | Date: | Tue, 03 Jul 2018 16:58:37 +0000 |
| Subject: | com php-src: [ci skip] Document zend_parse_parameters_non e(): README.PARAMETER_PARSING_API | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102387@lists.php.net to get a copy of this message | ||
Commit: e51b364a50a81c9df77368eedb0156d6670f6c16
Author: Christoph M. Becker <cmbecker69@gmx.de> Tue, 3 Jul 2018 18:58:07 +0200
Parents: 29000091b2e5e07c8c0e2dd061a663b87c52e116
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e51b364a50a81c9df77368eedb0156d6670f6c16
Log:
[ci skip] Document zend_parse_parameters_none()
Changed paths:
M README.PARAMETER_PARSING_API
Diff:
diff --git a/README.PARAMETER_PARSING_API b/README.PARAMETER_PARSING_API
index 7f3da76..1f00c33 100644
--- a/README.PARAMETER_PARSING_API
+++ b/README.PARAMETER_PARSING_API
@@ -28,6 +28,13 @@ 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.3 includes a new function (actually implemented as macro):
+
+int zend_parse_parameters_none();
+
+This returns SUCCESS if no argument has been passed to the function,
+FAILURE otherwise.
+
PHP 5.5 includes a new function:
int zend_parse_parameter(int flags, int arg_num, zval **arg, const char *spec, ...);
@@ -221,3 +228,8 @@ if (zend_parse_parameters(ZEND_NUM_ARGS(), "a*l", &array,
&varargs, &num_varargs
for (i = 0; i < num_varargs; i++) {
/* do something with varargs[i] */
}
+
+/* Function that doesn't accept any arguments */
+if (zend_parse_parameters_none() == FAILURE) {
+ return;
+}