xref: /PHP-7.4/Zend/tests/033.phpt (revision c42b7dd6)
1--TEST--
2Using undefined multidimensional array
3--FILE--
4<?php
5
6$arr[1][2][3][4][5];
7
8echo $arr[1][2][3][4][5];
9
10$arr[1][2][3][4][5]->foo;
11
12$arr[1][2][3][4][5]->foo = 1;
13
14$arr[][] = 2;
15
16$arr[][]->bar = 2;
17
18?>
19--EXPECTF--
20Notice: Undefined variable: arr in %s on line %d
21
22Notice: Trying to access array offset on value of type null in %s on line %d
23
24Notice: Trying to access array offset on value of type null in %s on line %d
25
26Notice: Trying to access array offset on value of type null in %s on line %d
27
28Notice: Trying to access array offset on value of type null in %s on line %d
29
30Notice: Trying to access array offset on value of type null in %s on line %d
31
32Notice: Undefined variable: arr in %s on line %d
33
34Notice: Trying to access array offset on value of type null in %s on line %d
35
36Notice: Trying to access array offset on value of type null in %s on line %d
37
38Notice: Trying to access array offset on value of type null in %s on line %d
39
40Notice: Trying to access array offset on value of type null in %s on line %d
41
42Notice: Trying to access array offset on value of type null in %s on line %d
43
44Notice: Undefined variable: arr in %s on line %d
45
46Notice: Trying to access array offset on value of type null in %s on line %d
47
48Notice: Trying to access array offset on value of type null in %s on line %d
49
50Notice: Trying to access array offset on value of type null in %s on line %d
51
52Notice: Trying to access array offset on value of type null in %s on line %d
53
54Notice: Trying to access array offset on value of type null in %s on line %d
55
56Notice: Trying to get property 'foo' of non-object in %s on line %d
57
58Warning: Creating default object from empty value in %s on line %d
59
60Warning: Creating default object from empty value in %s on line %d
61