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();

preferences:
41.78 ms | 402 KiB | 5 Q