Skip to content

Commit a652a00

Browse files
committed
Follow-up GH-22829
1 parent 9518d49 commit a652a00

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

Zend/Optimizer/dfa_pass.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ static uint32_t zend_dfa_optimize_calls(zend_op_array *op_array, zend_ssa *ssa)
471471
}
472472

473473
if (call_info->caller_call_opline && call_info->caller_call_opline->opcode == ZEND_CALLABLE_CONVERT_PARTIAL) {
474-
/* Build a bitset of constant pre-bound PFA args: These are args whose value is alway the same for all
474+
/* Build a bitset of constant pre-bound PFA args: These are args whose value is always the same for all
475475
* instances of a PFA. */
476476
uint32_t const_args = 0;
477477
for (uint32_t i = 0, l = MIN(sizeof(const_args)*CHAR_BIT, call_info->num_args); i < l; i++) {

Zend/tests/partial_application/const_arg_opt.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ $f(2);
4646
echo "# Constant pre-bound argument:\n";
4747
$f = f(2, ?);
4848
print_lexical_vars($f);
49-
$f(2);
49+
$f(1);
5050

5151
echo "# Constant pre-bound argument (inverted):\n";
52-
$f = f(?, 2);
52+
$f = f(?, 3);
5353
print_lexical_vars($f);
54-
$f(1);
54+
$f(4);
5555

5656
echo "# Inlined pre-bound argument:\n";
5757
$f = f(g(), ?);
@@ -100,15 +100,15 @@ array(2) {
100100
[0]=>
101101
int(2)
102102
[1]=>
103-
int(2)
103+
int(1)
104104
}
105105
# Constant pre-bound argument (inverted):
106106
no lexical vars
107107
array(2) {
108108
[0]=>
109-
int(1)
109+
int(4)
110110
[1]=>
111-
int(2)
111+
int(3)
112112
}
113113
# Inlined pre-bound argument:
114114
no lexical vars

Zend/zend_ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ static zend_result ZEND_FASTCALL zend_ast_evaluate_inner(
13521352
ZEND_CALL_NUM_ARGS(frame), ZEND_CALL_ARG(frame, 1),
13531353
extra_named_params, named_positions,
13541354
fcc_ast->filename, &ast->lineno,
1355-
(void**)cache_slot, fcc_ast->name, flags, 0);
1355+
(void**)cache_slot, fcc_ast->name, flags, /* const_args */ 0);
13561356

13571357
if (named_positions) {
13581358
zend_array_release(named_positions);

0 commit comments

Comments
 (0)