3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function google($x){function_exists($x)||eval("function $x(\$y){echo \$y;}");$x(strlen($x));} google('bing'); google('bing'); google('google');
based on ntHEq
Output for 7.0.5 - 7.2.0
44 Parse error: syntax error, unexpected '6' (T_LNUMBER), expecting '(' in /in/QvElh(3) : eval()'d code on line 1
Process exited with code 255.
Output for 7.0.0 - 7.0.4
44 Parse error: syntax error, unexpected '6' (T_LNUMBER), expecting identifier (T_STRING) or '(' in /in/QvElh(3) : eval()'d code on line 1
Process exited with code 255.
Output for 5.5.24 - 5.6.28
44 Parse error: syntax error, unexpected '6' (T_LNUMBER), expecting '(' in /in/QvElh(3) : eval()'d code on line 1 Fatal error: Function name must be a string in /in/QvElh on line 3
Process exited with code 255.
Output for 5.4.2 - 5.4.45
44 Parse error: syntax error, unexpected '6' (T_LNUMBER), expecting identifier (T_STRING) or '(' in /in/QvElh(3) : eval()'d code on line 1 Fatal error: Function name must be a string in /in/QvElh on line 3
Process exited with code 255.
Output for 5.3.18 - 5.3.29
44 Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING or '(' in /in/QvElh(3) : eval()'d code on line 1 Fatal error: Function name must be a string in /in/QvElh on line 3
Process exited with code 255.