3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace { function foo($where) { echo "{$where}:\n"; debug_print_backtrace(); } call_user_func("foo", "No namespace"); echo "\n"; } namespace bar { call_user_func("foo", "In a namespace"); }
Output for hhvm-3.18.5 - 3.21.3, 7.0.28 - 7.3.1
No namespace: #0 foo(No namespace) called at [/in/q3qk5:10] In a namespace: #0 foo(In a namespace) #1 call_user_func(foo, In a namespace) called at [/in/q3qk5:18]
Output for hhvm-3.22.0
No namespace: #0 foo(No namespace) called at [/in/q3qk5:-1] In a namespace: #0 foo(In a namespace) #1 call_user_func(foo, In a namespace) called at [/in/q3qk5:-1]
Output for 5.6.30
No namespace: #0 foo(No namespace) #1 call_user_func(foo, No namespace) called at [/in/q3qk5:10] In a namespace: #0 foo(In a namespace) #1 call_user_func(foo, In a namespace) called at [/in/q3qk5:18]