3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $_test=array("Test1", "Test2"); private function getTest() { return &$this->_test; } public function test() { $test=$this->getTest(); $test[1]="xxx"; print_r($this->_test); } } $test=new Test(); $test->test();
Output for 5.3.0 - 5.3.22, 5.3.24, 5.4.0 - 5.4.12, 5.4.14
Parse error: syntax error, unexpected '&' in S9idg on line 5
Process exited with code 255.
Output for 5.3.23, 5.4.13
Parse error: syntax error, unexpected '&' in /in/HsBoJ on line 5
Process exited with code 255.

preferences:
192.35 ms | 1386 KiB | 47 Q