xref: /PHP-7.2/Zend/tests/offset_null.phpt (revision 17ccbeec)
1--TEST--
2using different variables to access null offsets
3--FILE--
4<?php
5
6$null = NULL;
7
8var_dump($null[1]);
9var_dump($null[0.0836]);
10var_dump($null[NULL]);
11var_dump($null["run away"]);
12
13var_dump($null[TRUE]);
14var_dump($null[FALSE]);
15
16$fp = fopen(__FILE__, "r");
17var_dump($null[$fp]);
18
19$obj = new stdClass;
20var_dump($null[$obj]);
21
22$arr = Array(1,2,3);
23var_dump($null[$arr]);
24
25echo "Done\n";
26?>
27--EXPECTF--
28NULL
29NULL
30NULL
31NULL
32NULL
33NULL
34NULL
35NULL
36NULL
37Done
38