3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo() { $GLOBALS['stack'] = debug_backtrace(); } ob_start('foo'); ob_get_flush(); print_r($stack);
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Array ( [0] => Array ( [function] => foo [args] => Array ( [0] => [1] => 9 ) ) [1] => Array ( [file] => /in/P521O [line] => 10 [function] => ob_get_flush [args] => Array ( ) ) )
Output for hhvm-3.10.0 - 3.12.0
Array ( [0] => Array ( [file] => /in/P521O [line] => 10 [function] => foo [args] => Array ( [0] => [1] => 9 ) ) )
Output for 4.3.0 - 4.4.9, 5.0.5 - 5.3.29
Array ( [0] => Array ( [function] => foo [args] => Array ( [0] => [1] => 5 ) ) [1] => Array ( [file] => /in/P521O [line] => 10 [function] => ob_get_flush [args] => Array ( ) ) )
Output for 5.0.0 - 5.0.4
Array ( [0] => Array ( [file] => /in/P521O [line] => 10 [function] => foo [args] => Array ( [0] => [1] => 5 ) ) [1] => Array ( [file] => /in/P521O [line] => 10 [function] => ob_get_flush [args] => Array ( ) ) )