Skip to content

Commit 387c78a

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: Fix type inference
2 parents 796511f + 9824735 commit 387c78a

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

Zend/Optimizer/zend_inference.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2703,9 +2703,6 @@ static zend_always_inline zend_result _zend_update_type_info(
27032703
tmp |= MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING;
27042704
}
27052705
}
2706-
if (t1 & MAY_BE_OBJECT) {
2707-
tmp |= MAY_BE_REF;
2708-
}
27092706
tmp |= MAY_BE_RC1 | MAY_BE_RCN;
27102707
UPDATE_SSA_TYPE(tmp, ssa_op->result_def);
27112708
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
JIT ASSIGN_DIM: 008
3+
--INI--
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.file_update_protection=0
7+
opcache.jit_buffer_size=1M
8+
--FILE--
9+
<?php
10+
function(int $a) {
11+
$arr = $a[] = (y);
12+
$arr = y;
13+
$c = $y = $arr[] = y($c);
14+
}
15+
?>
16+
DONE
17+
--EXPECT--
18+
DONE

0 commit comments

Comments
 (0)