3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function addFive($num) { $num += 5; } function addSix(&$num) { $num += 6; } $orignum = 10; addFive( &$orignum ); echo ("Original Value is $orignum“); addSix( $orignum ); echo “Original Value is $orignum “;
based on 4siWW
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '&' in /in/s8ttG on line 12
Process exited with code 255.
Output for 5.4.11 - 5.6.16
Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of addFive(). in /in/s8ttG on line 12
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of addFive(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /in/s8ttG on line 12 Parse error: syntax error, unexpected $end in /in/s8ttG on line 16
Process exited with code 255.