com php-src: Add assert arginfo stubs: ext/standard/basic_fun ctions.c ext/standard/basic_functions.stub.php ext/ standard/basic_functions_arginfo.h
| From: | Nikita Popov | Date: | Mon, 26 Aug 2019 13:41:31 +0000 |
| Subject: | com php-src: Add assert arginfo stubs: ext/standard/basic_fun ctions.c ext/standard/basic_functions.stub.php ext/ standard/basic_functions_arginfo.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108065@lists.php.net to get a copy of this message | ||
Commit: d2210dc2ea69adabbe87a118223970ee2e323e41
Author: Burak Çakırel <burakcakirel@gmail.com> Sun, 25 Aug 2019 23:07:16 +0300
Committer: Nikita Popov <nikita.ppv@gmail.com> Mon, 26 Aug 2019 15:41:31 +0200
Parents: a98307df8771f9b7fb0227ac2d4459e1419b887c
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d2210dc2ea69adabbe87a118223970ee2e323e41
Log:
Add assert arginfo stubs
Closes GH-4619.
Changed paths:
M ext/standard/basic_functions.c
M ext/standard/basic_functions.stub.php
M ext/standard/basic_functions_arginfo.h
Diff:
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
old mode 100644
new mode 100755
index 06765eb..83b3189
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -348,17 +348,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_sys_getloadavg, 0)
ZEND_END_ARG_INFO()
#endif
/* }}} */
-/* {{{ assert.c */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_assert, 0, 0, 1)
- ZEND_ARG_INFO(0, assertion)
- ZEND_ARG_INFO(0, description)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_assert_options, 0, 0, 1)
- ZEND_ARG_INFO(0, what)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO()
-/* }}} */
/* {{{ browscap.c */
ZEND_BEGIN_ARG_INFO_EX(arginfo_get_browser, 0, 0, 0)
ZEND_ARG_INFO(0, browser_name)
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php
old mode 100644
new mode 100755
index 0da6f99...e110e5f
--- a/ext/standard/basic_functions.stub.php
+++ b/ext/standard/basic_functions.stub.php
@@ -389,3 +389,11 @@ function htmlentities(string $string, int $quote_style = ENT_COMPAT, ?string
$en
function get_html_translation_table(int $table = HTML_SPECIALCHARS, int $quote_style = ENT_COMPAT,
string $encoding = "UTF-8"): array {}
/* }}} */
+
+/* assert.c */
+
+/** @param mixed $assertion */
+function assert($assertion, $description = null): bool {}
+
+/** @return int|string|bool|null */
+function assert_options(int $what, $value = UNKNOWN) {}
diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h
old mode 100644
new mode 100755
index f236aa9..6663c41
--- a/ext/standard/basic_functions_arginfo.h
+++ b/ext/standard/basic_functions_arginfo.h
@@ -506,3 +506,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_html_translation_table, 0,
0
ZEND_ARG_TYPE_INFO(0, quote_style, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_assert, 0, 1, _IS_BOOL, 0)
+ ZEND_ARG_INFO(0, assertion)
+ ZEND_ARG_INFO(0, description)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_assert_options, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, what, IS_LONG, 0)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()