blob: 2f7d66fd2e6ccf507c8f3b4b3a05b0e0309c6b6d (
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
30
31
32
33
34
35
36
37
|
--TEST--
Trying to write on method return
--FILE--
<?php
error_reporting(E_ALL);
class foo {
public $x = array();
public function b() {
return $this->x;
}
public function c() {
return $x;
}
static public function d() {
}
}
$foo = new foo;
$foo->b()[0] = 1;
$foo->c()[100] = 2;
foo::d()[] = 3;
print "ok\n";
?>
--EXPECTF--
Notice: Undefined variable: x in %s on line %d
ok
|