From: Nikita Popov Date: Tue, 29 Jan 2019 08:40:19 +0000 (+0100) Subject: Merge branch 'PHP-7.3' into PHP-7.4 X-Git-Tag: php-7.4.0alpha1~1148 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16460ebc81afab482e5e6abea5cf94e4c4b225e4;p=php Merge branch 'PHP-7.3' into PHP-7.4 --- 16460ebc81afab482e5e6abea5cf94e4c4b225e4 diff --cc Zend/zend_compile.c index 01c90559db,fccc45c994..5f86710b24 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@@ -3805,14 -4009,19 +3799,22 @@@ void zend_compile_call(znode *result, z zend_op *opline; lcname = zend_string_tolower(Z_STR_P(name)); - fbc = zend_hash_find_ptr(CG(function_table), lcname); + + /* Special assert() handling should apply independently of compiler flags. */ + if (fbc && zend_string_equals_literal(lcname, "assert")) { + zend_compile_assert(result, zend_ast_get_list(args_ast), lcname, fbc); + zend_string_release(lcname); + zval_ptr_dtor(&name_node.u.constant); + return; + } + if (!fbc + /* Don't use INIT_FCALL for recursive calls */ + || (fbc == (zend_function*)CG(active_op_array)) || (fbc->type == ZEND_INTERNAL_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS)) || (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS)) + || (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_OTHER_FILES) && fbc->op_array.filename != CG(active_op_array)->filename) ) { zend_string_release_ex(lcname, 0); zend_compile_dynamic_call(result, &name_node, args_ast);