3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.4.14
Parse error: syntax error, unexpected '&' in /in/HsBoJ on line 5
Process exited with code 255.