3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace blah; function foo($bar) { throw new \Exception(); } function bar() { call_user_func('blah\\foo', 'baz'); } bar();
based on N26ac
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Exception in /in/Q2SfB:5 Stack trace: #0 [internal function]: blah\foo('baz') #1 /in/Q2SfB(6): call_user_func('blah\\foo', 'baz') #2 /in/Q2SfB(8): blah\bar() #3 {main} thrown in /in/Q2SfB on line 5
Process exited with code 255.
Output for hhvm-3.10.0, hhvm-3.13.2
Fatal error: Uncaught exception 'Exception' with message '' in /in/Q2SfB:5 Stack trace: #0 (): blah\foo() #1 /in/Q2SfB(6): call_user_func() #2 /in/Q2SfB(8): blah\bar() #3 {main}
Process exited with code 255.
Output for hhvm-3.12.0
Fatal error: Uncaught exception 'Exception' with message '' in /in/Q2SfB:4 Stack trace: #0 (): blah\foo() #1 /in/Q2SfB(5): call_user_func() #2 /in/Q2SfB(4): blah\bar() #3 {main}
Process exited with code 255.
Output for 5.4.27 - 5.4.45, 5.5.11 - 5.6.28
Fatal error: Uncaught exception 'Exception' in /in/Q2SfB:5 Stack trace: #0 [internal function]: blah\foo('baz') #1 /in/Q2SfB(6): call_user_func('blah\\foo', 'baz') #2 /in/Q2SfB(8): blah\bar() #3 {main} thrown in /in/Q2SfB on line 5
Process exited with code 255.
Output for 5.3.0 - 5.4.26, 5.5.0 - 5.5.10
Fatal error: Uncaught exception 'Exception' in /in/Q2SfB:5 Stack trace: #0 [internal function]: blah\foo('baz') #1 /in/Q2SfB(6): call_user_func('blah\foo', 'baz') #2 /in/Q2SfB(8): blah\bar() #3 {main} thrown in /in/Q2SfB on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/Q2SfB on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING in /in/Q2SfB on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Q2SfB on line 3
Process exited with code 255.