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