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); $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 = get_called_class(); } var_dump('debug_backtrace full', microtime(true) - $start); } } $foo = new Foo; $foo->recurseBenchCallerContex(10000, 100);
based on SNTqD
Output for 7.1.0
string(15) "debug_backtrace" float(0.11751914024353) string(20) "debug_backtrace full" float(0.00027894973754883)
Output for 7.0.14
string(15) "debug_backtrace" float(0.23116993904114) string(20) "debug_backtrace full" float(0.0003058910369873)
Output for 7.0.6
string(15) "debug_backtrace" float(0.18938302993774) string(20) "debug_backtrace full" float(0.00021696090698242)
Output for 7.0.5
string(15) "debug_backtrace" float(0.20147895812988) string(20) "debug_backtrace full" float(0.00021219253540039)
Output for 7.0.4
string(15) "debug_backtrace" float(0.20554709434509) string(20) "debug_backtrace full" float(0.00021100044250488)
Output for 7.0.3
string(15) "debug_backtrace" float(0.19159293174744) string(20) "debug_backtrace full" float(0.0002140998840332)
Output for 7.0.2
string(15) "debug_backtrace" float(0.17749714851379) string(20) "debug_backtrace full" float(0.00020980834960938)
Output for 7.0.1
string(15) "debug_backtrace" float(0.19735193252563) string(20) "debug_backtrace full" float(0.00021219253540039)
Output for 7.0.0
string(15) "debug_backtrace" float(0.2003800868988) string(20) "debug_backtrace full" float(0.00020980834960938)
Output for 5.6.28
string(15) "debug_backtrace" float(0.42792201042175) string(20) "debug_backtrace full" float(0.00071597099304199)
Output for 5.6.21
string(15) "debug_backtrace" float(0.39938902854919) string(20) "debug_backtrace full" float(0.00078201293945312)
Output for 5.6.20
string(15) "debug_backtrace" float(0.39141893386841) string(20) "debug_backtrace full" float(0.00074410438537598)
Output for 5.6.19
string(15) "debug_backtrace" float(0.35330986976624) string(20) "debug_backtrace full" float(0.00076889991760254)
Output for 5.6.18
string(15) "debug_backtrace" float(0.38670301437378) string(20) "debug_backtrace full" float(0.00072908401489258)
Output for 5.6.17
string(15) "debug_backtrace" float(0.38786697387695) string(20) "debug_backtrace full" float(0.0007481575012207)
Output for 5.6.16
string(15) "debug_backtrace" float(0.36413311958313) string(20) "debug_backtrace full" float(0.00071978569030762)
Output for 5.6.15
string(15) "debug_backtrace" float(0.52928709983826) string(20) "debug_backtrace full" float(0.001168966293335)
Output for 5.6.14
string(15) "debug_backtrace" float(0.39513802528381) string(20) "debug_backtrace full" float(0.00075292587280273)
Output for 5.6.13
string(15) "debug_backtrace" float(0.38633012771606) string(20) "debug_backtrace full" float(0.00075006484985352)
Output for 5.6.12
string(15) "debug_backtrace" float(0.38523006439209) string(20) "debug_backtrace full" float(0.00075101852416992)
Output for 5.6.11
string(15) "debug_backtrace" float(0.41350507736206) string(20) "debug_backtrace full" float(0.00075507164001465)
Output for 5.6.10
string(15) "debug_backtrace" float(0.38946008682251) string(20) "debug_backtrace full" float(0.00073790550231934)
Output for 5.6.9
string(15) "debug_backtrace" float(0.3842658996582) string(20) "debug_backtrace full" float(0.00073599815368652)
Output for 5.6.8
string(15) "debug_backtrace" float(0.35026001930237) string(20) "debug_backtrace full" float(0.00070905685424805)
Output for 5.5.35
string(15) "debug_backtrace" float(0.40162086486816) string(20) "debug_backtrace full" float(0.00082516670227051)
Output for 5.5.34
string(15) "debug_backtrace" float(0.40054988861084) string(20) "debug_backtrace full" float(0.00076007843017578)
Output for 5.5.33
string(15) "debug_backtrace" float(0.39504408836365) string(20) "debug_backtrace full" float(0.00074911117553711)
Output for 5.5.32
string(15) "debug_backtrace" float(0.38228607177734) string(20) "debug_backtrace full" float(0.0007789134979248)
Output for 5.5.31
string(15) "debug_backtrace" float(0.34958291053772) string(20) "debug_backtrace full" float(0.00075387954711914)
Output for 5.5.30
string(15) "debug_backtrace" float(0.40693807601929) string(20) "debug_backtrace full" float(0.00074005126953125)
Output for 5.5.29
string(15) "debug_backtrace" float(0.38934803009033) string(20) "debug_backtrace full" float(0.00077986717224121)
Output for 5.5.28
string(15) "debug_backtrace" float(0.36256098747253) string(20) "debug_backtrace full" float(0.00073599815368652)
Output for 5.5.27
string(15) "debug_backtrace" float(0.3921811580658) string(20) "debug_backtrace full" float(0.0007789134979248)
Output for 5.5.26
string(15) "debug_backtrace" float(0.38345909118652) string(20) "debug_backtrace full" float(0.00076508522033691)
Output for 5.5.25
string(15) "debug_backtrace" float(0.38983702659607) string(20) "debug_backtrace full" float(0.00081515312194824)
Output for 5.5.24
string(15) "debug_backtrace" float(0.46628594398499) string(20) "debug_backtrace full" float(0.00079202651977539)
Output for 5.4.45
string(15) "debug_backtrace" float(1.1625120639801) string(20) "debug_backtrace full" float(0.0014500617980957)
Output for 5.4.44
string(15) "debug_backtrace" float(1.3396210670471) string(20) "debug_backtrace full" float(0.0014450550079346)
Output for 5.4.43
string(15) "debug_backtrace" float(0.75876212120056) string(20) "debug_backtrace full" float(0.0014770030975342)
Output for 5.4.42
string(15) "debug_backtrace" float(1.4826259613037) string(20) "debug_backtrace full" float(0.0015149116516113)
Output for 5.4.41
string(15) "debug_backtrace" float(0.49923801422119) string(20) "debug_backtrace full" float(0.0006561279296875)
Output for 5.4.40
string(15) "debug_backtrace" float(0.56289196014404) string(20) "debug_backtrace full" float(0.00079798698425293)
Output for 5.4.39
string(15) "debug_backtrace" float(0.46549701690674) string(20) "debug_backtrace full" float(0.0010919570922852)
Output for 5.4.38
string(15) "debug_backtrace" float(0.67607593536377) string(20) "debug_backtrace full" float(0.0013859272003174)
Output for 5.4.37
string(15) "debug_backtrace" float(0.59479403495789) string(20) "debug_backtrace full" float(0.0012190341949463)
Output for 5.4.36
string(15) "debug_backtrace" float(0.67229700088501) string(20) "debug_backtrace full" float(0.0013859272003174)
Output for 5.4.35
string(15) "debug_backtrace" float(0.66710615158081) string(20) "debug_backtrace full" float(0.0012118816375732)
Output for 5.4.34
string(15) "debug_backtrace" float(0.65244603157043) string(20) "debug_backtrace full" float(0.0013949871063232)
Output for 5.4.32
string(15) "debug_backtrace" float(0.45852398872375) string(20) "debug_backtrace full" float(0.00092005729675293)
Output for 5.4.31
string(15) "debug_backtrace" float(0.45401120185852) string(20) "debug_backtrace full" float(0.00089097023010254)
Output for 5.4.30
string(15) "debug_backtrace" float(0.4714560508728) string(20) "debug_backtrace full" float(0.00094103813171387)
Output for 5.4.29
string(15) "debug_backtrace" float(0.46874904632568) string(20) "debug_backtrace full" float(0.00095987319946289)
Output for 5.4.28
string(15) "debug_backtrace" float(0.46597814559937) string(20) "debug_backtrace full" float(0.00085806846618652)
Output for 5.4.27
string(15) "debug_backtrace" float(0.45840787887573) string(20) "debug_backtrace full" float(0.0010569095611572)
Output for 5.4.26
string(15) "debug_backtrace" float(0.45927405357361) string(20) "debug_backtrace full" float(0.00089406967163086)
Output for 5.4.25
string(15) "debug_backtrace" float(0.45883989334106) string(20) "debug_backtrace full" float(0.00087594985961914)
Output for 5.4.24
string(15) "debug_backtrace" float(0.54623699188232) string(20) "debug_backtrace full" float(0.00093603134155273)
Output for 5.4.23
string(15) "debug_backtrace" float(0.4508810043335) string(20) "debug_backtrace full" float(0.00096797943115234)
Output for 5.4.22
string(15) "debug_backtrace" float(0.45075798034668) string(20) "debug_backtrace full" float(0.0009150505065918)
Output for 5.4.21
string(15) "debug_backtrace" float(0.44382286071777) string(20) "debug_backtrace full" float(0.00087213516235352)
Output for 5.4.20
string(15) "debug_backtrace" float(0.46998405456543) string(20) "debug_backtrace full" float(0.00086808204650879)
Output for 5.4.19
string(15) "debug_backtrace" float(0.46948409080505) string(20) "debug_backtrace full" float(0.0010499954223633)
Output for 5.4.18
string(15) "debug_backtrace" float(0.49272704124451) string(20) "debug_backtrace full" float(0.001060962677002)
Output for 5.4.17
string(15) "debug_backtrace" float(0.45896291732788) string(20) "debug_backtrace full" float(0.0010499954223633)
Output for 5.4.16
string(15) "debug_backtrace" float(0.47381901741028) string(20) "debug_backtrace full" float(0.00089812278747559)
Output for 5.4.15
string(15) "debug_backtrace" float(0.44403195381165) string(20) "debug_backtrace full" float(0.0008549690246582)
Output for 5.4.14
string(15) "debug_backtrace" float(0.4717390537262) string(20) "debug_backtrace full" float(0.00090694427490234)
Output for 5.4.13
string(15) "debug_backtrace" float(0.47527885437012) string(20) "debug_backtrace full" float(0.0009760856628418)
Output for 5.4.12
string(15) "debug_backtrace" float(0.48134589195251) string(20) "debug_backtrace full" float(0.00094199180603027)
Output for 5.4.11
string(15) "debug_backtrace" float(0.48669385910034) string(20) "debug_backtrace full" float(0.00090193748474121)
Output for 5.4.10
string(15) "debug_backtrace" float(0.46909618377686) string(20) "debug_backtrace full" float(0.00090193748474121)
Output for 5.4.9
string(15) "debug_backtrace" float(0.46551704406738) string(20) "debug_backtrace full" float(0.00091695785522461)
Output for 5.4.8
string(15) "debug_backtrace" float(0.46319508552551) string(20) "debug_backtrace full" float(0.00085306167602539)
Output for 5.4.7
string(15) "debug_backtrace" float(0.48519802093506) string(20) "debug_backtrace full" float(0.00087881088256836)
Output for 5.4.6
string(15) "debug_backtrace" float(0.48648500442505) string(20) "debug_backtrace full" float(0.00091099739074707)
Output for 5.4.5
string(15) "debug_backtrace" float(0.47821283340454) string(20) "debug_backtrace full" float(0.0009009838104248)
Output for 5.4.4
string(15) "debug_backtrace" float(0.48225498199463) string(20) "debug_backtrace full" float(0.00089287757873535)
Output for 5.4.3
string(15) "debug_backtrace" float(0.50016689300537) string(20) "debug_backtrace full" float(0.00088405609130859)
Output for 5.4.2
string(15) "debug_backtrace" float(0.50114989280701) string(20) "debug_backtrace full" float(0.00098299980163574)
Output for 5.4.1
string(15) "debug_backtrace" float(0.49473690986633) string(20) "debug_backtrace full" float(0.00092101097106934)
Output for 5.4.0
string(15) "debug_backtrace" float(0.48125100135803) string(20) "debug_backtrace full" float(0.0009000301361084)
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/PraMp on line 3