3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function stringAppend($str) { $str = $str."append"; //không có return } function stringPrepend($str) { $str = "prepend".$str; } $aString = "PHP"; echo stringPrepend(stringAppend($aString));// Không có return function updateValue(&$number) { $number = $number +1; } $val = 9; echo updateValue(&$val);
based on eJZLJ
Output for 7.1.0 - 7.2.4
Parse error: syntax error, unexpected '&' in /in/7bUJm on line 24
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Call-time pass-by-reference has been removed in /in/7bUJm:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Call-time pass-by-reference has been removed in /in/7bUJm:24 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Call-time pass-by-reference has been removed in /in/7bUJm on line 24
Process exited with code 255.