You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dstogov Can you have a look at this? I have no idea why this doesn't work as expected as the relevant JIT handler (zend_jit_fetch_dim_r_helper()) looks to be implemented correctly. Here is the test file:
--TEST--
GH-12812: JIT: Integer string in variable used as offset produces wrong undefined array key warning
--INI--
opcache.enable=1
opcache.enable_cli=1
--FILE--
<?php$container = [];
$dimension = '7';
try {
var_dump($container['7']);
} catch (\Throwable$e) {
echo$e->getMessage(), "\n";
}
try {
var_dump($container[$dimension]);
} catch (\Throwable$e) {
echo$e->getMessage(), "\n";
}
?>
--EXPECTF--
Warning: Undefined array key 7 in %s on line %d
NULL
Warning: Undefined array key 7 in %s on line %d
NULL
dstogov
added a commit
to dstogov/php-src
that referenced
this issue
Nov 28, 2023
Description
Found while working on #12723
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.2
Operating System
No response
The text was updated successfully, but these errors were encountered: