mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Merge branch 'PHP-7.0'
* PHP-7.0: add compiler option to disable builtins (special case function calls)
This commit is contained in:
commit
dc78e02ad2
@ -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;
|
||||
}
|
||||
|
@ -1019,6 +1019,9 @@ END_EXTERN_C()
|
||||
/* force IS_OBJ_USE_GUARDS for all classes */
|
||||
#define ZEND_COMPILE_GUARDS (1<<9)
|
||||
|
||||
/* disable builtin special case function calls */
|
||||
#define ZEND_COMPILE_NO_BUILTINS (1<<10)
|
||||
|
||||
/* The default value for CG(compiler_options) */
|
||||
#define ZEND_COMPILE_DEFAULT ZEND_COMPILE_HANDLE_OP_ARRAY
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user