xref: /PHP-7.0/Zend/tests/isset_003_2_4.phpt (revision c5920af5)
1--TEST--
2Testing isset accessing undefined array itens and properties
3--SKIPIF--
4<?php if (version_compare(zend_version(), '2.4.0', '<')) die('skip ZendEngine 2.4 needed'); ?>
5--FILE--
6<?php
7
8$a = 'foo';
9$b =& $a;
10
11var_dump(isset($b));
12
13var_dump(isset($a[0], $b[1]));
14
15var_dump(isset($a[0]->a));
16
17var_dump(isset($c[0][1][2]->a->b->c->d));
18
19var_dump(isset(${$a}->{$b->{$c[$d]}}));
20
21var_dump(isset($GLOBALS));
22
23var_dump(isset($GLOBALS[1]));
24
25var_dump(isset($GLOBALS[1]->$GLOBALS));
26
27?>
28--EXPECTF--
29bool(true)
30bool(true)
31bool(false)
32bool(false)
33
34Notice: Undefined variable: c in %s on line %d
35
36Notice: Undefined variable: d in %s on line %d
37
38Notice: Trying to get property of non-object in %s on line %d
39bool(false)
40bool(true)
41bool(false)
42bool(false)
43