3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function &g(&$v) { $v = 5; return $v; } $foo = null; $name = 'this'; var_dump(g($$name)); var_dump($foo); //var_dump(array(g($$name)));
Output for 7.1.0
Fatal error: Uncaught Error: Cannot re-assign $this in /in/bR8nE:9 Stack trace: #0 {main} thrown in /in/bR8nE on line 9
Process exited with code 255.
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.0.14
int(5) NULL
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/bR8nE on line 11
Process exited with code 255.