mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fixed type inference
This commit is contained in:
commit
cffba945e5
2 changed files with 23 additions and 0 deletions
|
@ -2791,6 +2791,9 @@ static zend_always_inline int _zend_update_type_info(
|
||||||
if (t1 & ((MAY_BE_ANY|MAY_BE_UNDEF) - MAY_BE_STRING)) {
|
if (t1 & ((MAY_BE_ANY|MAY_BE_UNDEF) - MAY_BE_STRING)) {
|
||||||
tmp |= (OP1_DATA_INFO() & (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF));
|
tmp |= (OP1_DATA_INFO() & (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF));
|
||||||
|
|
||||||
|
if (OP1_DATA_INFO() & MAY_BE_UNDEF) {
|
||||||
|
tmp |= MAY_BE_NULL;
|
||||||
|
}
|
||||||
if (opline->op2_type == IS_UNUSED) {
|
if (opline->op2_type == IS_UNUSED) {
|
||||||
/* When appending to an array and the LONG_MAX key is already used
|
/* When appending to an array and the LONG_MAX key is already used
|
||||||
* null will be returned. */
|
* null will be returned. */
|
||||||
|
|
20
ext/opcache/tests/jit/assign_dim_003.phpt
Normal file
20
ext/opcache/tests/jit/assign_dim_003.phpt
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--TEST--
|
||||||
|
JIT ASSIGN_DIM: 003
|
||||||
|
--INI--
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.file_update_protection=0
|
||||||
|
opcache.jit_buffer_size=1M
|
||||||
|
opcache.jit=tracing
|
||||||
|
--EXTENSIONS--
|
||||||
|
opcache
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
function test() {
|
||||||
|
var_dump($a[0] = $v);
|
||||||
|
}
|
||||||
|
test();
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
Warning: Undefined variable $v in %sassign_dim_003.php on line 3
|
||||||
|
NULL
|
Loading…
Add table
Add a link
Reference in a new issue