Closed
Description
Description
Found while working on #12723
The following code:
<?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";
}
Resulted in this output:
Warning: Undefined array key 7 in %s on line %d
NULL
Warning: Undefined array key "7" in %s on line %d
NULL
But I expected this output instead:
Warning: Undefined array key 7 in %s on line %d
NULL
Warning: Undefined array key 7 in %s on line %d
NULL
PHP Version
PHP 8.2
Operating System
No response