3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function google($x){function_exists($x)||eval("function $x(){echo strlen($x);}");$x();} google('bing'); google('bing'); google('google');
based on oWCSX
Output for 7.2.0
Warning: Use of undefined constant bing - assumed 'bing' (this will throw an Error in a future version of PHP) in /in/gb1am(3) : eval()'d code on line 1 4 Warning: Use of undefined constant bing - assumed 'bing' (this will throw an Error in a future version of PHP) in /in/gb1am(3) : eval()'d code on line 1 4 Fatal error: Uncaught ArgumentCountError: Too few arguments to function google(), 0 passed in /in/gb1am on line 3 and exactly 1 expected in /in/gb1am:3 Stack trace: #0 /in/gb1am(3): google() #1 /in/gb1am(7): google('google') #2 {main} thrown in /in/gb1am on line 3
Process exited with code 255.
Output for 7.1.0 - 7.1.10
Notice: Use of undefined constant bing - assumed 'bing' in /in/gb1am(3) : eval()'d code on line 1 4 Notice: Use of undefined constant bing - assumed 'bing' in /in/gb1am(3) : eval()'d code on line 1 4 Fatal error: Uncaught ArgumentCountError: Too few arguments to function google(), 0 passed in /in/gb1am on line 3 and exactly 1 expected in /in/gb1am:3 Stack trace: #0 /in/gb1am(3): google() #1 /in/gb1am(7): google('google') #2 {main} thrown in /in/gb1am on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Notice: Use of undefined constant bing - assumed 'bing' in /in/gb1am(3) : eval()'d code on line 1 4 Notice: Use of undefined constant bing - assumed 'bing' in /in/gb1am(3) : eval()'d code on line 1 4 Warning: Missing argument 1 for google(), called in /in/gb1am on line 3 and defined in /in/gb1am on line 3 Notice: Undefined variable: x in /in/gb1am on line 3 Notice: Undefined variable: x in /in/gb1am on line 3 Notice: Undefined variable: x in /in/gb1am on line 3 Parse error: syntax error, unexpected end of file in /in/gb1am(3) : eval()'d code on line 1
Process exited with code 255.
Output for 5.4.2 - 5.6.28
Notice: Use of undefined constant bing - assumed 'bing' in /in/gb1am(3) : eval()'d code on line 1 4 Notice: Use of undefined constant bing - assumed 'bing' in /in/gb1am(3) : eval()'d code on line 1 4 Warning: Missing argument 1 for google(), called in /in/gb1am on line 3 and defined in /in/gb1am on line 3 Notice: Undefined variable: x in /in/gb1am on line 3 Notice: Undefined variable: x in /in/gb1am on line 3 Notice: Undefined variable: x in /in/gb1am on line 3 Parse error: syntax error, unexpected end of file in /in/gb1am(3) : eval()'d code on line 1 Notice: Undefined variable: x in /in/gb1am on line 3 Fatal error: Function name must be a string in /in/gb1am on line 3
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Notice: Use of undefined constant bing - assumed 'bing' in /in/gb1am(3) : eval()'d code on line 1 4 Notice: Use of undefined constant bing - assumed 'bing' in /in/gb1am(3) : eval()'d code on line 1 4 Warning: Missing argument 1 for google(), called in /in/gb1am on line 3 and defined in /in/gb1am on line 3 Notice: Undefined variable: x in /in/gb1am on line 3 Notice: Undefined variable: x in /in/gb1am on line 3 Notice: Undefined variable: x in /in/gb1am on line 3 Parse error: syntax error, unexpected $end in /in/gb1am(3) : eval()'d code on line 1 Notice: Undefined variable: x in /in/gb1am on line 3 Fatal error: Function name must be a string in /in/gb1am on line 3
Process exited with code 255.