3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $params = array(); public $testValue = 6; function test() { $this->params[] = &{$this->value}; var_dump($this->params); } function test2() { var_dump($this->params); } } $foo = new Foo(); $foo->test(); $foo->test2();
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
Parse error: syntax error, unexpected '{' in /in/p1BVT on line 10
Process exited with code 255.

preferences:
195.78 ms | 1395 KiB | 62 Q