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, 4); $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.0075700283050537) string(20) "debug_backtrace full" float(0.00039505958557129)
Output for 7.0.14
string(15) "debug_backtrace" float(0.015820980072021) string(20) "debug_backtrace full" float(0.00056195259094238)
Output for 7.0.6
string(15) "debug_backtrace" float(0.0087211132049561) string(20) "debug_backtrace full" float(0.00021791458129883)
Output for 7.0.5
string(15) "debug_backtrace" float(0.01357102394104) string(20) "debug_backtrace full" float(0.00031900405883789)
Output for 7.0.4
string(15) "debug_backtrace" float(0.014780044555664) string(20) "debug_backtrace full" float(0.00028896331787109)
Output for 7.0.3
string(15) "debug_backtrace" float(0.010450839996338) string(20) "debug_backtrace full" float(0.00023388862609863)
Output for 7.0.2
string(15) "debug_backtrace" float(0.01218581199646) string(20) "debug_backtrace full" float(0.00030708312988281)
Output for 7.0.1
string(15) "debug_backtrace" float(0.0087358951568604) string(20) "debug_backtrace full" float(0.0002281665802002)
Output for 7.0.0
string(15) "debug_backtrace" float(0.008868932723999) string(20) "debug_backtrace full" float(0.00021004676818848)
Output for hhvm-3.12.0
string(15) "debug_backtrace" float(0.0081000328063965) string(20) "debug_backtrace full" float(0.00072789192199707)
Output for hhvm-3.10.0
string(15) "debug_backtrace" float(0.0091021060943604) string(20) "debug_backtrace full" float(0.00080108642578125)
Output for 5.6.28
string(15) "debug_backtrace" float(0.029628038406372) string(20) "debug_backtrace full" float(0.0012190341949463)
Output for 5.6.21
string(15) "debug_backtrace" float(0.02056097984314) string(20) "debug_backtrace full" float(0.0010449886322021)
Output for 5.6.20
string(15) "debug_backtrace" float(0.02361798286438) string(20) "debug_backtrace full" float(0.0010008811950684)
Output for 5.6.19
string(15) "debug_backtrace" float(0.021878957748413) string(20) "debug_backtrace full" float(0.00098800659179688)
Output for 5.6.18
string(15) "debug_backtrace" float(0.018140077590942) string(20) "debug_backtrace full" float(0.00082707405090332)
Output for 5.6.17
string(15) "debug_backtrace" float(0.022356033325195) string(20) "debug_backtrace full" float(0.0010008811950684)
Output for 5.6.16
string(15) "debug_backtrace" float(0.016422986984253) string(20) "debug_backtrace full" float(0.00078892707824707)
Output for 5.6.15
string(15) "debug_backtrace" float(0.020139932632446) string(20) "debug_backtrace full" float(0.00091290473937988)
Output for 5.6.14
string(15) "debug_backtrace" float(0.016454219818115) string(20) "debug_backtrace full" float(0.00075101852416992)
Output for 5.6.13
string(15) "debug_backtrace" float(0.023916959762573) string(20) "debug_backtrace full" float(0.001270055770874)
Output for 5.6.12
string(15) "debug_backtrace" float(0.015371084213257) string(20) "debug_backtrace full" float(0.00073504447937012)
Output for 5.6.11
string(15) "debug_backtrace" float(0.024091958999634) string(20) "debug_backtrace full" float(0.0010800361633301)
Output for 5.6.10
string(15) "debug_backtrace" float(0.015177965164185) string(20) "debug_backtrace full" float(0.00078392028808594)
Output for 5.6.9
string(15) "debug_backtrace" float(0.018459796905518) string(20) "debug_backtrace full" float(0.00083398818969727)
Output for 5.6.8
string(15) "debug_backtrace" float(0.020520925521851) string(20) "debug_backtrace full" float(0.0010020732879639)
Output for 5.5.35
string(15) "debug_backtrace" float(0.020437002182007) string(20) "debug_backtrace full" float(0.00089788436889648)
Output for 5.5.34
string(15) "debug_backtrace" float(0.02488899230957) string(20) "debug_backtrace full" float(0.0011610984802246)
Output for 5.5.33
string(15) "debug_backtrace" float(0.025295972824097) string(20) "debug_backtrace full" float(0.0010819435119629)
Output for 5.5.32
string(15) "debug_backtrace" float(0.023773908615112) string(20) "debug_backtrace full" float(0.0013420581817627)
Output for 5.5.31
string(15) "debug_backtrace" float(0.020540952682495) string(20) "debug_backtrace full" float(0.00093913078308105)
Output for 5.5.30
string(15) "debug_backtrace" float(0.015594959259033) string(20) "debug_backtrace full" float(0.00073719024658203)
Output for 5.5.29
string(15) "debug_backtrace" float(0.0242600440979) string(20) "debug_backtrace full" float(0.0010390281677246)
Output for 5.5.28
string(15) "debug_backtrace" float(0.018672943115234) string(20) "debug_backtrace full" float(0.00084686279296875)
Output for 5.5.27
string(15) "debug_backtrace" float(0.022758960723877) string(20) "debug_backtrace full" float(0.0010318756103516)
Output for 5.5.26
string(15) "debug_backtrace" float(0.021416902542114) string(20) "debug_backtrace full" float(0.00074601173400879)
Output for 5.5.25
string(15) "debug_backtrace" float(0.023561000823975) string(20) "debug_backtrace full" float(0.0010280609130859)
Output for 5.5.24
string(15) "debug_backtrace" float(0.026113986968994) string(20) "debug_backtrace full" float(0.0011451244354248)
Output for 5.4.45
string(15) "debug_backtrace" float(0.022318124771118) string(20) "debug_backtrace full" float(0.0013430118560791)
Output for 5.4.44
string(15) "debug_backtrace" float(0.022541046142578) string(20) "debug_backtrace full" float(0.0010311603546143)
Output for 5.4.43
string(15) "debug_backtrace" float(0.022584915161133) string(20) "debug_backtrace full" float(0.0011379718780518)
Output for 5.4.42
string(15) "debug_backtrace" float(0.022425174713135) string(20) "debug_backtrace full" float(0.001115083694458)
Output for 5.4.41
string(15) "debug_backtrace" float(0.022425889968872) string(20) "debug_backtrace full" float(0.0011680126190186)
Output for 5.4.40
string(15) "debug_backtrace" float(0.023407936096191) string(20) "debug_backtrace full" float(0.001054048538208)
Output for 5.4.39
string(15) "debug_backtrace" float(0.021594047546387) string(20) "debug_backtrace full" float(0.0010299682617188)
Output for 5.4.38
string(15) "debug_backtrace" float(0.023429870605469) string(20) "debug_backtrace full" float(0.0012009143829346)
Output for 5.4.37
string(15) "debug_backtrace" float(0.023060083389282) string(20) "debug_backtrace full" float(0.0011630058288574)
Output for 5.4.36
string(15) "debug_backtrace" float(0.016351938247681) string(20) "debug_backtrace full" float(0.00078010559082031)
Output for 5.4.35
string(15) "debug_backtrace" float(0.022202014923096) string(20) "debug_backtrace full" float(0.00086498260498047)
Output for 5.4.34
string(15) "debug_backtrace" float(0.021583080291748) string(20) "debug_backtrace full" float(0.0010981559753418)
Output for 5.4.32
string(15) "debug_backtrace" float(0.016445159912109) string(20) "debug_backtrace full" float(0.00079607963562012)
Output for 5.4.31
string(15) "debug_backtrace" float(0.019810199737549) string(20) "debug_backtrace full" float(0.00098490715026855)
Output for 5.4.30
string(15) "debug_backtrace" float(0.018738985061646) string(20) "debug_backtrace full" float(0.00098681449890137)
Output for 5.4.29
string(15) "debug_backtrace" float(0.024071931838989) string(20) "debug_backtrace full" float(0.0011229515075684)
Output for 5.4.28
string(15) "debug_backtrace" float(0.015298843383789) string(20) "debug_backtrace full" float(0.0008089542388916)
Output for 5.4.27
string(15) "debug_backtrace" float(0.02183198928833) string(20) "debug_backtrace full" float(0.00087380409240723)
Output for 5.4.26
string(15) "debug_backtrace" float(0.016442060470581) string(20) "debug_backtrace full" float(0.00084590911865234)
Output for 5.4.25
string(15) "debug_backtrace" float(0.019201993942261) string(20) "debug_backtrace full" float(0.0009610652923584)
Output for 5.4.24
string(15) "debug_backtrace" float(0.019408941268921) string(20) "debug_backtrace full" float(0.00078201293945312)
Output for 5.4.23
string(15) "debug_backtrace" float(0.022084951400757) string(20) "debug_backtrace full" float(0.0011529922485352)
Output for 5.4.22
string(15) "debug_backtrace" float(0.02278208732605) string(20) "debug_backtrace full" float(0.0010881423950195)
Output for 5.4.21
string(15) "debug_backtrace" float(0.015599012374878) string(20) "debug_backtrace full" float(0.00081896781921387)
Output for 5.4.20
string(15) "debug_backtrace" float(0.020632982254028) string(20) "debug_backtrace full" float(0.0010330677032471)
Output for 5.4.19
string(15) "debug_backtrace" float(0.02373194694519) string(20) "debug_backtrace full" float(0.001215934753418)
Output for 5.4.18
string(15) "debug_backtrace" float(0.022913932800293) string(20) "debug_backtrace full" float(0.0010249614715576)
Output for 5.4.17
string(15) "debug_backtrace" float(0.025080919265747) string(20) "debug_backtrace full" float(0.0012941360473633)
Output for 5.4.16
string(15) "debug_backtrace" float(0.02062201499939) string(20) "debug_backtrace full" float(0.0010120868682861)
Output for 5.4.15
string(15) "debug_backtrace" float(0.022389888763428) string(20) "debug_backtrace full" float(0.0010471343994141)
Output for 5.4.14
string(15) "debug_backtrace" float(0.022886037826538) string(20) "debug_backtrace full" float(0.0011131763458252)
Output for 5.4.13
string(15) "debug_backtrace" float(0.01643705368042) string(20) "debug_backtrace full" float(0.00080180168151855)
Output for 5.4.12
string(15) "debug_backtrace" float(0.016674995422363) string(20) "debug_backtrace full" float(0.0007779598236084)
Output for 5.4.11
string(15) "debug_backtrace" float(0.019513130187988) string(20) "debug_backtrace full" float(0.0009620189666748)
Output for 5.4.10
string(15) "debug_backtrace" float(0.02088189125061) string(20) "debug_backtrace full" float(0.0010218620300293)
Output for 5.4.9
string(15) "debug_backtrace" float(0.023274898529053) string(20) "debug_backtrace full" float(0.001431941986084)
Output for 5.4.8
string(15) "debug_backtrace" float(0.022325992584229) string(20) "debug_backtrace full" float(0.0010020732879639)
Output for 5.4.7
string(15) "debug_backtrace" float(0.022931098937988) string(20) "debug_backtrace full" float(0.0010449886322021)
Output for 5.4.6
string(15) "debug_backtrace" float(0.020380020141602) string(20) "debug_backtrace full" float(0.00096511840820312)
Output for 5.4.5
string(15) "debug_backtrace" float(0.015969038009644) string(20) "debug_backtrace full" float(0.00077390670776367)
Output for 5.4.4
string(15) "debug_backtrace" float(0.021339893341064) string(20) "debug_backtrace full" float(0.0010130405426025)
Output for 5.4.3
string(15) "debug_backtrace" float(0.016098022460938) string(20) "debug_backtrace full" float(0.00076603889465332)
Output for 5.4.2
string(15) "debug_backtrace" float(0.02311897277832) string(20) "debug_backtrace full" float(0.0010988712310791)
Output for 5.4.1
string(15) "debug_backtrace" float(0.019994020462036) string(20) "debug_backtrace full" float(0.00080490112304688)
Output for 5.4.0
string(15) "debug_backtrace" float(0.019810914993286) string(20) "debug_backtrace full" float(0.00090885162353516)
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/BmDtb on line 3