diff options
| author | Joe Watkins <krakjoe@php.net> | 2016-05-04 10:54:29 +0100 |
|---|---|---|
| committer | Joe Watkins <krakjoe@php.net> | 2016-05-04 10:54:29 +0100 |
| commit | dc78e02ad240094e286174fab84881a32f58d070 (patch) | |
| tree | 16da212bc82632ca0e433e39a78f9b253bb4b20d /Zend/zend_compile.c | |
| parent | c38310f25a418fad80a8a81f8b376553f57be164 (diff) | |
| parent | 9bbee305e3bb1d85ddad6bad92409818953207d5 (diff) | |
| download | php-git-dc78e02ad240094e286174fab84881a32f58d070.tar.gz | |
Merge branch 'PHP-7.0'
* PHP-7.0:
add compiler option to disable builtins (special case function calls)
Diffstat (limited to 'Zend/zend_compile.c')
| -rw-r--r-- | Zend/zend_compile.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 3adcc55f4e..46c057e4f2 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3563,6 +3563,14 @@ int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_l return FAILURE; } + if (zend_string_equals_literal(lcname, "assert")) { + return zend_compile_assert(result, args, lcname, fbc); + } + + if (CG(compiler_options) & ZEND_COMPILE_NO_BUILTINS) { + return FAILURE; + } + if (zend_string_equals_literal(lcname, "strlen")) { return zend_compile_func_strlen(result, args); } else if (zend_string_equals_literal(lcname, "is_null")) { @@ -3597,8 +3605,6 @@ int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_l return zend_compile_func_cufa(result, args, lcname); } else if (zend_string_equals_literal(lcname, "call_user_func")) { return zend_compile_func_cuf(result, args, lcname); - } else if (zend_string_equals_literal(lcname, "assert")) { - return zend_compile_assert(result, args, lcname, fbc); } else { return FAILURE; } |
