summaryrefslogtreecommitdiff
path: root/Zend/tests/result_unused.phpt
blob: 12892e8415469aa2792d181246fc7f53c4752cbd (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
--TEST--
Unused result of fetch operations
--FILE--
<?php
$x = array(1);
$a = "x";
$$a;

$x = array(array(2));
$x[0];

$x = "str";
$x[0];
$x[3];

class Foo {
	public $prop = array(3);
	function __get($name) {
		return array(4);
	}
}
$x = new Foo();
$x->prop;
$x->y;
echo "ok\n";
--EXPECTF--
Notice: Uninitialized string offset: 3 in %sresult_unused.php on line %d
ok