3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function function_stack() { $class = new ClassStack(); $class->methodStack(); } class ClassStack { public function methodStack() { print_r(debug_backtrace()); } } call_user_func('function_stack');
Output for 7.0.0 - 7.2.0
Array ( [0] => Array ( [file] => /in/hIjHf [line] => 5 [function] => methodStack [class] => ClassStack [object] => ClassStack Object ( ) [type] => -> [args] => Array ( ) ) [1] => Array ( [file] => /in/hIjHf [line] => 14 [function] => function_stack [args] => Array ( ) ) )
Output for 5.3.22 - 5.6.28
Array ( [0] => Array ( [file] => /in/hIjHf [line] => 5 [function] => methodStack [class] => ClassStack [object] => ClassStack Object ( ) [type] => -> [args] => Array ( ) ) [1] => Array ( [function] => function_stack [args] => Array ( ) ) [2] => Array ( [file] => /in/hIjHf [line] => 14 [function] => call_user_func [args] => Array ( [0] => function_stack ) ) )