Skip to content

Commit dbb9a64

Browse files
committed
Apply optimization to uppercase calls
1 parent 8c38481 commit dbb9a64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Zend/Optimizer/dfa_pass.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ int zend_dfa_optimize_calls(zend_op_array *op_array, zend_ssa *ssa)
412412
if ((op->opcode == ZEND_FRAMELESS_ICALL_2
413413
|| (op->opcode == ZEND_FRAMELESS_ICALL_3 && (op + 1)->op1_type == IS_CONST))
414414
&& call_info->callee_func
415-
&& zend_string_equals_literal(call_info->callee_func->common.function_name, "in_array")) {
415+
&& zend_string_equals_literal_ci(call_info->callee_func->common.function_name, "in_array")) {
416416

417417
bool strict = 0;
418418
bool has_opdata = op->opcode == ZEND_FRAMELESS_ICALL_3;

ext/opcache/tests/gh18050.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function test($v) {
1313
$ary = ['x', 'y'];
1414
var_dump(in_array($v, $ary));
1515
var_dump(in_array($v, $ary, false));
16-
var_dump(in_array($v, $ary, true));
16+
var_dump(IN_ARRAY($v, $ary, true));
1717

1818
if (in_array($v, $ary, true)) {
1919
echo "True\n";

0 commit comments

Comments
 (0)