3v4l.org

run code in 300+ PHP versions simultaneously
<?php class E { protected $a = array('franz' => 'de leon', 'cheryl' => 'chua'); public function a() { $a =& $this->a; return &$a; } } $ar = new E; $arr = $ar->a(); $arr['john'] = 'doe'; var_dump($ar->a());
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
Parse error: syntax error, unexpected '&' in /in/V2itM on line 12
Process exited with code 255.

preferences:
182.85 ms | 1387 KiB | 62 Q