diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2015-02-05 11:01:07 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2015-02-05 11:01:07 +0300 |
| commit | f5a9cfc33ab86e343b5cbf0d0a39a62037c32975 (patch) | |
| tree | 05433d4070b6396fdaa3d65117fa61c29d16d348 /Zend/zend_builtin_functions.c | |
| parent | 067902daee9b293eec5b319c466d3f12fa643a27 (diff) | |
| parent | 601fcc31af502fcf7aa36b8de53dfd4004fda613 (diff) | |
| download | php-git-f5a9cfc33ab86e343b5cbf0d0a39a62037c32975.tar.gz | |
Merge branch 'internal-function-return-types' of github.com:reeze/php-src into test
* 'internal-function-return-types' of github.com:reeze/php-src:
Add load time return type checking to match user land logic
Add test function arguments
Implemented internal function return types
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 2fce4b7964..fe7c8f7556 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -87,6 +87,7 @@ static ZEND_FUNCTION(debug_backtrace); static ZEND_FUNCTION(debug_print_backtrace); #if ZEND_DEBUG static ZEND_FUNCTION(zend_test_func); +static ZEND_FUNCTION(zend_test_func2); #ifdef ZTS static ZEND_FUNCTION(zend_thread_id); #endif @@ -243,6 +244,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_extension_loaded, 0, 0, 1) ZEND_ARG_INFO(0, extension_name) ZEND_END_ARG_INFO() + +#ifdef ZEND_DEBUG +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_zend_test_func, IS_ARRAY, NULL, 0) +ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_zend_test_func2, IS_ARRAY, NULL, 1) +ZEND_END_ARG_INFO() +#endif + /* }}} */ static const zend_function_entry builtin_functions[] = { /* {{{ */ @@ -304,7 +313,8 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */ ZEND_FE(debug_backtrace, arginfo_debug_backtrace) ZEND_FE(debug_print_backtrace, arginfo_debug_print_backtrace) #if ZEND_DEBUG - ZEND_FE(zend_test_func, NULL) + ZEND_FE(zend_test_func, arginfo_zend_test_func) + ZEND_FE(zend_test_func2, arginfo_zend_test_func2) #ifdef ZTS ZEND_FE(zend_thread_id, NULL) #endif @@ -1954,6 +1964,13 @@ ZEND_FUNCTION(zend_test_func) zend_get_parameters(ZEND_NUM_ARGS(), 2, &arg1, &arg2); } +ZEND_FUNCTION(zend_test_func2) +{ + zval *arg1, *arg2; + + zend_get_parameters(ZEND_NUM_ARGS(), 2, &arg1, &arg2); +} + #ifdef ZTS ZEND_FUNCTION(zend_thread_id) |
