3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $params = array(); public $testValues = array(1, 2, 3); function test() { $this->params[] = &$this->testValue[0]; var_dump($this->params); } function test2() { var_dump($this->params); } } $foo = new Foo(); $foo->test(); $foo->test2();

preferences:
51.24 ms | 402 KiB | 5 Q