mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
d30cd7d7e7
Closes GH-5590
67 lines
1.8 KiB
PHP
67 lines
1.8 KiB
PHP
--TEST--
|
|
Using undefined multidimensional array
|
|
--FILE--
|
|
<?php
|
|
|
|
$arr[1][2][3][4][5];
|
|
|
|
echo $arr[1][2][3][4][5];
|
|
|
|
$arr[1][2][3][4][5]->foo;
|
|
|
|
try {
|
|
$arr[1][2][3][4][5]->foo = 1;
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
$arr[][] = 2;
|
|
|
|
try {
|
|
$arr[][]->bar = 2;
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Undefined variable $arr in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Undefined variable $arr in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Undefined variable $arr in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Warning: Attempt to read property "foo" on null in %s on line %d
|
|
Attempt to assign property "foo" on null
|
|
Attempt to assign property "bar" on null
|