summaryrefslogtreecommitdiff
path: root/Zend/tests/result_unused.phpt
blob: d508aaa7edaa5a068ece070e3c2f6f7a3f023616 (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
--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--
Warning: Uninitialized string offset 3 in %s on line %d
ok