3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(PHP_VERSION_ID < 50400) { return; } class Foo { function recurseBenchCallerContex($iterations, $recursionLimit) { if($recursionLimit > 0) { return $this->recurseBenchCallerContex($iterations, $recursionLimit - 1); } $start = microtime(true); for($c = 0; $c < $iterations; $c++) { $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); $class = isset($trace[1]['class']) ? $trace[1]['class'] : null; } var_dump('debug_backtrace', microtime(true) - $start); $start = microtime(true); for($c = 0; $c < $iterations; $c++) { $class = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); } $start = microtime(true); var_dump('debug_backtrace full', microtime(true) - $start); } } $foo = new Foo; $foo->recurseBenchCallerContex(10000, 100);
based on OOqJJ
Output for 7.1.0
string(15) "debug_backtrace" float(0.0047638416290283) string(20) "debug_backtrace full" float(0)
Output for 7.0.14
string(15) "debug_backtrace" float(0.0090739727020264) string(20) "debug_backtrace full" float(0)
Output for 7.0.6
string(15) "debug_backtrace" float(0.0050301551818848) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 7.0.5
string(15) "debug_backtrace" float(0.0054259300231934) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 7.0.4
string(15) "debug_backtrace" float(0.0063331127166748) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 7.0.3
string(15) "debug_backtrace" float(0.0050280094146729) string(20) "debug_backtrace full" float(0)
Output for 7.0.2
string(15) "debug_backtrace" float(0.005608081817627) string(20) "debug_backtrace full" float(0)
Output for 7.0.1
string(15) "debug_backtrace" float(0.0072469711303711) string(20) "debug_backtrace full" float(0)
Output for 7.0.0
string(15) "debug_backtrace" float(0.0070199966430664) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for hhvm-3.12.0
string(15) "debug_backtrace" float(0.0051732063293457) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for hhvm-3.10.0
string(15) "debug_backtrace" float(0.0058948993682861) string(20) "debug_backtrace full" float(1.9073486328125E-6)
Output for 5.6.28
string(15) "debug_backtrace" float(0.01732611656189) string(20) "debug_backtrace full" float(0)
Output for 5.6.21
string(15) "debug_backtrace" float(0.010071992874146) string(20) "debug_backtrace full" float(0)
Output for 5.6.20
string(15) "debug_backtrace" float(0.0090451240539551) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.6.19
string(15) "debug_backtrace" float(0.0091738700866699) string(20) "debug_backtrace full" float(0)
Output for 5.6.18
string(15) "debug_backtrace" float(0.0124351978302) string(20) "debug_backtrace full" float(0)
Output for 5.6.17
string(15) "debug_backtrace" float(0.0095851421356201) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.6.16
string(15) "debug_backtrace" float(0.012981176376343) string(20) "debug_backtrace full" float(0)
Output for 5.6.15
string(15) "debug_backtrace" float(0.01151704788208) string(20) "debug_backtrace full" float(0)
Output for 5.6.14
string(15) "debug_backtrace" float(0.009364128112793) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.6.13
string(15) "debug_backtrace" float(0.0090110301971436) string(20) "debug_backtrace full" float(0)
Output for 5.6.12
string(15) "debug_backtrace" float(0.010973930358887) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.6.11
string(15) "debug_backtrace" float(0.0099391937255859) string(20) "debug_backtrace full" float(0)
Output for 5.6.10
string(15) "debug_backtrace" float(0.014257192611694) string(20) "debug_backtrace full" float(0)
Output for 5.6.9
string(15) "debug_backtrace" float(0.011500835418701) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.6.8
string(15) "debug_backtrace" float(0.0094709396362305) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.5.35
string(15) "debug_backtrace" float(0.010617971420288) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.5.34
string(15) "debug_backtrace" float(0.0091578960418701) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.5.33
string(15) "debug_backtrace" float(0.014724016189575) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.5.32
string(15) "debug_backtrace" float(0.012907028198242) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.5.31
string(15) "debug_backtrace" float(0.0103440284729) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.5.30
string(15) "debug_backtrace" float(0.0095489025115967) string(20) "debug_backtrace full" float(0)
Output for 5.5.29
string(15) "debug_backtrace" float(0.015625) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.5.28
string(15) "debug_backtrace" float(0.0091538429260254) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.5.27
string(15) "debug_backtrace" float(0.013833999633789) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.5.26
string(15) "debug_backtrace" float(0.015043973922729) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.5.25
string(15) "debug_backtrace" float(0.012017965316772) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.5.24
string(15) "debug_backtrace" float(0.020469903945923) string(20) "debug_backtrace full" float(0)
Output for 5.4.45
string(15) "debug_backtrace" float(0.082464218139648) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.44
string(15) "debug_backtrace" float(0.016002893447876) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.4.43
string(15) "debug_backtrace" float(0.0078799724578857) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.42
string(15) "debug_backtrace" float(0.0096650123596191) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.41
string(15) "debug_backtrace" float(0.11900901794434) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.40
string(15) "debug_backtrace" float(0.015249013900757) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.39
string(15) "debug_backtrace" float(0.029254913330078) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.38
string(15) "debug_backtrace" float(0.03174901008606) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.37
string(15) "debug_backtrace" float(0.015622138977051) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.36
string(15) "debug_backtrace" float(0.016155958175659) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.4.35
string(15) "debug_backtrace" float(0.018081188201904) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.34
string(15) "debug_backtrace" float(0.015676975250244) string(20) "debug_backtrace full" float(1.9073486328125E-6)
Output for 5.4.32
string(15) "debug_backtrace" float(0.011320114135742) string(20) "debug_backtrace full" float(0)
Output for 5.4.31
string(15) "debug_backtrace" float(0.010739088058472) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.4.30
string(15) "debug_backtrace" float(0.01105785369873) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.29
string(15) "debug_backtrace" float(0.011476993560791) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.28
string(15) "debug_backtrace" float(0.012109994888306) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.27
string(15) "debug_backtrace" float(0.011960983276367) string(20) "debug_backtrace full" float(0)
Output for 5.4.26
string(15) "debug_backtrace" float(0.011666059494019) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.25
string(15) "debug_backtrace" float(0.011453866958618) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.24
string(15) "debug_backtrace" float(0.011540174484253) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.23
string(15) "debug_backtrace" float(0.011409044265747) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.22
string(15) "debug_backtrace" float(0.011851072311401) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.4.21
string(15) "debug_backtrace" float(0.01168417930603) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.20
string(15) "debug_backtrace" float(0.01112699508667) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.19
string(15) "debug_backtrace" float(0.011887788772583) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.18
string(15) "debug_backtrace" float(0.012776136398315) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.17
string(15) "debug_backtrace" float(0.01239800453186) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.16
string(15) "debug_backtrace" float(0.012634992599487) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.15
string(15) "debug_backtrace" float(0.013303995132446) string(20) "debug_backtrace full" float(0)
Output for 5.4.14
string(15) "debug_backtrace" float(0.025553941726685) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.13
string(15) "debug_backtrace" float(0.012239933013916) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.12
string(15) "debug_backtrace" float(0.013341903686523) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.11
string(15) "debug_backtrace" float(0.011865139007568) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.10
string(15) "debug_backtrace" float(0.023405075073242) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.9
string(15) "debug_backtrace" float(0.01341700553894) string(20) "debug_backtrace full" float(0)
Output for 5.4.8
string(15) "debug_backtrace" float(0.021683931350708) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.4.7
string(15) "debug_backtrace" float(0.023734092712402) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.6
string(15) "debug_backtrace" float(0.01259708404541) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.5
string(15) "debug_backtrace" float(0.013295888900757) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.4
string(15) "debug_backtrace" float(0.020065069198608) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.3
string(15) "debug_backtrace" float(0.022705078125) string(20) "debug_backtrace full" float(1.1920928955078E-6)
Output for 5.4.2
string(15) "debug_backtrace" float(0.013605833053589) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.1
string(15) "debug_backtrace" float(0.024280786514282) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.4.0
string(15) "debug_backtrace" float(0.012602806091309) string(20) "debug_backtrace full" float(9.5367431640625E-7)
Output for 5.2.7 - 5.3.29
Output for 4.3.0 - 5.2.6
Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/b12pX on line 3