3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo(&$var) { $var++; } function bar() // Note the missing & { $a = 5; return $a; } foo(bar()); // Produces fatal error since PHP 5.0.5 foo($a = 5); // Expression, not variable foo(5); // Produces fatal error
Output for 4.3.2 - 5.4.27
Fatal error: Only variables can be passed by reference in /in/EB90P on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Only variables can be passed by reference in /in/EB90P on line 14