3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $callable = function(&$foo) { $foo = 42; }; $bar = 23; $callable(23); var_dump($bar);
based on ZpsXo
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in /in/moE3A:8 Stack trace: #0 {main} thrown in /in/moE3A on line 8
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Cannot pass parameter 1 by reference in /in/moE3A on line 8
Process exited with code 255.