mirror of https://github.com/php/php-src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.8 KiB
66 lines
1.8 KiB
--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--
|
|
Notice: Undefined variable: arr in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Undefined variable: arr in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Undefined variable: arr in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to access array offset on value of type null in %s on line %d
|
|
|
|
Notice: Trying to get property 'foo' of non-object in %s on line %d
|
|
Attempt to assign property 'foo' of non-object
|
|
Attempt to assign property 'bar' of non-object
|