3v4l.org

run code in 300+ PHP versions simultaneously
<?php function google($x){function_exists($x)||eval("function $x(\$y){echo \$y;}");$x(strlen($x));} google('bing'); google('bing'); google('google');
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
44 Parse error: syntax error, unexpected integer "6", expecting "(" in /in/QvElh(3) : eval()'d code on line 1
Process exited with code 255.
Output for 7.0.5 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
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.5.35, 5.6.7 - 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.

preferences:
196.88 ms | 401 KiB | 238 Q