summaryrefslogtreecommitdiff
path: root/Zend/tests/offset_null.phpt
blob: 9364f0a2e522d09e7fbcdd8fb777112c9a699e90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--TEST--
using different variables to access null offsets
--FILE--
<?php

$null = NULL;

var_dump($null[1]);
var_dump($null[0.0836]);
var_dump($null[NULL]);
var_dump($null["run away"]);

var_dump($null[TRUE]);
var_dump($null[FALSE]);

$fp = fopen(__FILE__, "r");
var_dump($null[$fp]);

$obj = new stdClass;
var_dump($null[$obj]);

$arr = Array(1,2,3);
var_dump($null[$arr]);

echo "Done\n";
?>
--EXPECTF--	
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
Done