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 5.3.0 - 5.6.8
Fatal error: Only variables can be passed by reference in /in/IjgS3 on line 14
Process exited with code 255.