Annotation of embedaddon/php/Zend/tests/dereference_010.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Testing dereference in non-array values
3: --FILE--
4: <?php
5:
6: error_reporting(E_ALL);
7:
8: function a() {
9: return 1;
10: }
11:
12: $a = 1;
13: var_dump($a[1]);
14: var_dump(a()[1]);
15:
16: function b() {
17: return new stdClass;
18: }
19:
20: var_dump(b()[1]);
21:
22: ?>
23: --EXPECTF--
24: NULL
25: NULL
26:
27: Fatal error: Cannot use object of type stdClass as array in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>