mirror of
https://github.com/php/php-src.git
synced 2024-12-25 01:40:50 +08:00
30 lines
368 B
PHP
30 lines
368 B
PHP
--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
|
|
|