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 = get_called_class(); } var_dump('debug_backtrace full', microtime(true) - $start); } } $foo = new Foo; $foo->recurseBenchCallerContex(10000, 100);
based on b12pX
Output for 7.1.0
string(15) "debug_backtrace" float(0.0043439865112305) string(20) "debug_backtrace full" float(0.00035405158996582)
Output for 7.0.14
string(15) "debug_backtrace" float(0.0090570449829102) string(20) "debug_backtrace full" float(0.00057101249694824)
Output for 7.0.12
string(15) "debug_backtrace" float(0.007612943649292) string(20) "debug_backtrace full" float(0.00031781196594238)
Output for 7.0.11
string(15) "debug_backtrace" float(0.0050561428070068) string(20) "debug_backtrace full" float(0.00020909309387207)
Output for 7.0.10
string(15) "debug_backtrace" float(0.011162996292114) string(20) "debug_backtrace full" float(0.00041699409484863)
Output for 7.0.9
string(15) "debug_backtrace" float(0.0042960643768311) string(20) "debug_backtrace full" float(0.00018596649169922)
Output for 7.0.8
string(15) "debug_backtrace" float(0.0058829784393311) string(20) "debug_backtrace full" float(0.00023221969604492)
Output for 7.0.7
string(15) "debug_backtrace" float(0.0057940483093262) string(20) "debug_backtrace full" float(0.00019001960754395)
Output for 7.0.6
string(15) "debug_backtrace" float(0.005295991897583) string(20) "debug_backtrace full" float(0.0002140998840332)
Output for 7.0.5
string(15) "debug_backtrace" float(0.0052740573883057) string(20) "debug_backtrace full" float(0.00021791458129883)
Output for 7.0.4
string(15) "debug_backtrace" float(0.011564016342163) string(20) "debug_backtrace full" float(0.00047421455383301)
Output for 7.0.3
string(15) "debug_backtrace" float(0.005424976348877) string(20) "debug_backtrace full" float(0.00021100044250488)
Output for 7.0.2
string(15) "debug_backtrace" float(0.0054337978363037) string(20) "debug_backtrace full" float(0.00027704238891602)
Output for 7.0.1
string(15) "debug_backtrace" float(0.0052540302276611) string(20) "debug_backtrace full" float(0.00028800964355469)
Output for 7.0.0
string(15) "debug_backtrace" float(0.0071899890899658) string(20) "debug_backtrace full" float(0.00026798248291016)
Output for 5.6.28
string(15) "debug_backtrace" float(0.0173180103302) string(20) "debug_backtrace full" float(0.0012619495391846)
Output for 5.6.27
string(15) "debug_backtrace" float(0.0087010860443115) string(20) "debug_backtrace full" float(0.00082087516784668)
Output for 5.6.26
string(15) "debug_backtrace" float(0.0091438293457031) string(20) "debug_backtrace full" float(0.00073814392089844)
Output for 5.6.25
string(15) "debug_backtrace" float(0.008080005645752) string(20) "debug_backtrace full" float(0.00060105323791504)
Output for 5.6.24
string(15) "debug_backtrace" float(0.0098080635070801) string(20) "debug_backtrace full" float(0.00072979927062988)
Output for 5.6.23
string(15) "debug_backtrace" float(0.019427061080933) string(20) "debug_backtrace full" float(0.0016000270843506)
Output for 5.6.22
string(15) "debug_backtrace" float(0.0098979473114014) string(20) "debug_backtrace full" float(0.0009760856628418)
Output for 5.6.21
string(15) "debug_backtrace" float(0.014224052429199) string(20) "debug_backtrace full" float(0.001093864440918)
Output for 5.6.20
string(15) "debug_backtrace" float(0.0093209743499756) string(20) "debug_backtrace full" float(0.0007939338684082)
Output for 5.6.19
string(15) "debug_backtrace" float(0.0086770057678223) string(20) "debug_backtrace full" float(0.00081801414489746)
Output for 5.6.18
string(15) "debug_backtrace" float(0.012049913406372) string(20) "debug_backtrace full" float(0.0010058879852295)
Output for 5.6.17
string(15) "debug_backtrace" float(0.010321140289307) string(20) "debug_backtrace full" float(0.00085091590881348)
Output for 5.6.16
string(15) "debug_backtrace" float(0.0083541870117188) string(20) "debug_backtrace full" float(0.00066709518432617)
Output for 5.6.15
string(15) "debug_backtrace" float(0.0098659992218018) string(20) "debug_backtrace full" float(0.0007631778717041)
Output for 5.6.14
string(15) "debug_backtrace" float(0.012765884399414) string(20) "debug_backtrace full" float(0.0010828971862793)
Output for 5.6.13
string(15) "debug_backtrace" float(0.015047073364258) string(20) "debug_backtrace full" float(0.0011770725250244)
Output for 5.6.12
string(15) "debug_backtrace" float(0.011833906173706) string(20) "debug_backtrace full" float(0.00076198577880859)
Output for 5.6.11
string(15) "debug_backtrace" float(0.01069712638855) string(20) "debug_backtrace full" float(0.00086092948913574)
Output for 5.6.10
string(15) "debug_backtrace" float(0.012902975082397) string(20) "debug_backtrace full" float(0.0010080337524414)
Output for 5.6.9
string(15) "debug_backtrace" float(0.014033079147339) string(20) "debug_backtrace full" float(0.0011098384857178)
Output for 5.6.8
string(15) "debug_backtrace" float(0.0089519023895264) string(20) "debug_backtrace full" float(0.00072407722473145)
Output for 5.6.7
string(15) "debug_backtrace" float(0.014182090759277) string(20) "debug_backtrace full" float(0.0010988712310791)
Output for 5.6.6
string(15) "debug_backtrace" float(0.01144003868103) string(20) "debug_backtrace full" float(0.00087285041809082)
Output for 5.6.5
string(15) "debug_backtrace" float(0.014791965484619) string(20) "debug_backtrace full" float(0.0008389949798584)
Output for 5.6.4
string(15) "debug_backtrace" float(0.01062798500061) string(20) "debug_backtrace full" float(0.00080204010009766)
Output for 5.6.3
string(15) "debug_backtrace" float(0.014665842056274) string(20) "debug_backtrace full" float(0.00090718269348145)
Output for 5.6.2
string(15) "debug_backtrace" float(0.014593839645386) string(20) "debug_backtrace full" float(0.0010709762573242)
Output for 5.6.1
string(15) "debug_backtrace" float(0.0089931488037109) string(20) "debug_backtrace full" float(0.0007169246673584)
Output for 5.6.0
string(15) "debug_backtrace" float(0.011996030807495) string(20) "debug_backtrace full" float(0.00098681449890137)
Output for 5.5.38
string(15) "debug_backtrace" float(0.015110015869141) string(20) "debug_backtrace full" float(0.0010950565338135)
Output for 5.5.37
string(15) "debug_backtrace" float(0.0098919868469238) string(20) "debug_backtrace full" float(0.00078392028808594)
Output for 5.5.36
string(15) "debug_backtrace" float(0.016816854476929) string(20) "debug_backtrace full" float(0.00075101852416992)
Output for 5.5.35
string(15) "debug_backtrace" float(0.012284994125366) string(20) "debug_backtrace full" float(0.00096797943115234)
Output for 5.5.34
string(15) "debug_backtrace" float(0.009566068649292) string(20) "debug_backtrace full" float(0.00075387954711914)
Output for 5.5.33
string(15) "debug_backtrace" float(0.024760007858276) string(20) "debug_backtrace full" float(0.0011417865753174)
Output for 5.5.32
string(15) "debug_backtrace" float(0.0095720291137695) string(20) "debug_backtrace full" float(0.00074577331542969)
Output for 5.5.31
string(15) "debug_backtrace" float(0.012094020843506) string(20) "debug_backtrace full" float(0.00090408325195312)
Output for 5.5.30
string(15) "debug_backtrace" float(0.011477947235107) string(20) "debug_backtrace full" float(0.00075602531433105)
Output for 5.5.29
string(15) "debug_backtrace" float(0.013679981231689) string(20) "debug_backtrace full" float(0.0010941028594971)
Output for 5.5.28
string(15) "debug_backtrace" float(0.01531195640564) string(20) "debug_backtrace full" float(0.0011658668518066)
Output for 5.5.27
string(15) "debug_backtrace" float(0.014545917510986) string(20) "debug_backtrace full" float(0.0011441707611084)
Output for 5.5.26
string(15) "debug_backtrace" float(0.013070106506348) string(20) "debug_backtrace full" float(0.00081706047058105)
Output for 5.5.25
string(15) "debug_backtrace" float(0.015424966812134) string(20) "debug_backtrace full" float(0.0012078285217285)
Output for 5.5.24
string(15) "debug_backtrace" float(0.013278007507324) string(20) "debug_backtrace full" float(0.00098705291748047)
Output for 5.5.23
string(15) "debug_backtrace" float(0.012224912643433) string(20) "debug_backtrace full" float(0.00094890594482422)
Output for 5.5.22
string(15) "debug_backtrace" float(0.010992050170898) string(20) "debug_backtrace full" float(0.00085687637329102)
Output for 5.5.21
string(15) "debug_backtrace" float(0.01305890083313) string(20) "debug_backtrace full" float(0.0014150142669678)
Output for 5.5.20
string(15) "debug_backtrace" float(0.0093250274658203) string(20) "debug_backtrace full" float(0.00074195861816406)
Output for 5.5.19
string(15) "debug_backtrace" float(0.014641046524048) string(20) "debug_backtrace full" float(0.0010199546813965)
Output for 5.5.18
string(15) "debug_backtrace" float(0.010179042816162) string(20) "debug_backtrace full" float(0.00078010559082031)
Output for 5.5.16
string(15) "debug_backtrace" float(0.015820026397705) string(20) "debug_backtrace full" float(0.0012099742889404)
Output for 5.5.15
string(15) "debug_backtrace" float(0.0094141960144043) string(20) "debug_backtrace full" float(0.00074481964111328)
Output for 5.5.14
string(15) "debug_backtrace" float(0.022114038467407) string(20) "debug_backtrace full" float(0.0015180110931396)
Output for 5.5.13
string(15) "debug_backtrace" float(0.0094590187072754) string(20) "debug_backtrace full" float(0.0007479190826416)
Output for 5.5.12
string(15) "debug_backtrace" float(0.011269092559814) string(20) "debug_backtrace full" float(0.00081801414489746)
Output for 5.5.11
string(15) "debug_backtrace" float(0.01108717918396) string(20) "debug_backtrace full" float(0.00089502334594727)
Output for 5.5.10
string(15) "debug_backtrace" float(0.0097599029541016) string(20) "debug_backtrace full" float(0.00082015991210938)
Output for 5.5.9
string(15) "debug_backtrace" float(0.020308017730713) string(20) "debug_backtrace full" float(0.0015509128570557)
Output for 5.5.8
string(15) "debug_backtrace" float(0.025551080703735) string(20) "debug_backtrace full" float(0.0010089874267578)
Output for 5.5.7
string(15) "debug_backtrace" float(0.0078318119049072) string(20) "debug_backtrace full" float(0.00060701370239258)
Output for 5.5.6
string(15) "debug_backtrace" float(0.0094301700592041) string(20) "debug_backtrace full" float(0.00074100494384766)
Output for 5.5.5
string(15) "debug_backtrace" float(0.010585069656372) string(20) "debug_backtrace full" float(0.0009770393371582)
Output for 5.5.4
string(15) "debug_backtrace" float(0.0095109939575195) string(20) "debug_backtrace full" float(0.00080299377441406)
Output for 5.5.3
string(15) "debug_backtrace" float(0.0099849700927734) string(20) "debug_backtrace full" float(0.00084400177001953)
Output for 5.5.2
string(15) "debug_backtrace" float(0.013556003570557) string(20) "debug_backtrace full" float(0.0010428428649902)
Output for 5.5.1
string(15) "debug_backtrace" float(0.013504981994629) string(20) "debug_backtrace full" float(0.0010600090026855)
Output for 5.5.0
string(15) "debug_backtrace" float(0.014741897583008) string(20) "debug_backtrace full" float(0.0011448860168457)
Output for 5.4.45
string(15) "debug_backtrace" float(0.01478910446167) string(20) "debug_backtrace full" float(0.0012390613555908)
Output for 5.4.44
string(15) "debug_backtrace" float(0.014097929000854) string(20) "debug_backtrace full" float(0.0011799335479736)
Output for 5.4.43
string(15) "debug_backtrace" float(0.010478973388672) string(20) "debug_backtrace full" float(0.00074911117553711)
Output for 5.4.42
string(15) "debug_backtrace" float(-0.012031078338623) string(20) "debug_backtrace full" float(0.0013241767883301)
Output for 5.4.41
string(15) "debug_backtrace" float(0.011427879333496) string(20) "debug_backtrace full" float(0.00096988677978516)
Output for 5.4.40
string(15) "debug_backtrace" float(0.014991044998169) string(20) "debug_backtrace full" float(0.0010058879852295)
Output for 5.4.39
string(15) "debug_backtrace" float(0.011183977127075) string(20) "debug_backtrace full" float(0.00094509124755859)
Output for 5.4.38
string(15) "debug_backtrace" float(0.012310981750488) string(20) "debug_backtrace full" float(0.0010418891906738)
Output for 5.4.37
string(15) "debug_backtrace" float(0.012154102325439) string(20) "debug_backtrace full" float(0.0011119842529297)
Output for 5.4.36
string(15) "debug_backtrace" float(0.012887001037598) string(20) "debug_backtrace full" float(0.0010969638824463)
Output for 5.4.35
string(15) "debug_backtrace" float(0.015475988388062) string(20) "debug_backtrace full" float(0.0013039112091064)
Output for 5.4.34
string(15) "debug_backtrace" float(0.014133930206299) string(20) "debug_backtrace full" float(0.0012290477752686)
Output for 5.4.32
string(15) "debug_backtrace" float(0.012032032012939) string(20) "debug_backtrace full" float(0.00098896026611328)
Output for 5.4.31
string(15) "debug_backtrace" float(0.0092599391937256) string(20) "debug_backtrace full" float(0.00081682205200195)
Output for 5.4.30
string(15) "debug_backtrace" float(0.010976791381836) string(20) "debug_backtrace full" float(0.00078201293945312)
Output for 5.4.29
string(15) "debug_backtrace" float(0.002838134765625) string(20) "debug_backtrace full" float(0.0010809898376465)
Output for 5.4.28
string(15) "debug_backtrace" float(0.013031005859375) string(20) "debug_backtrace full" float(0.0011401176452637)
Output for 5.4.27
string(15) "debug_backtrace" float(0.020504951477051) string(20) "debug_backtrace full" float(0.0017809867858887)
Output for 5.4.26
string(15) "debug_backtrace" float(0.012609004974365) string(20) "debug_backtrace full" float(0.0019590854644775)
Output for 5.4.25
string(15) "debug_backtrace" float(0.014568090438843) string(20) "debug_backtrace full" float(0.0011599063873291)
Output for 5.4.24
string(15) "debug_backtrace" float(0.011345863342285) string(20) "debug_backtrace full" float(0.0012860298156738)
Output for 5.4.23
string(15) "debug_backtrace" float(0.007720947265625) string(20) "debug_backtrace full" float(0.0006411075592041)
Output for 5.4.22
string(15) "debug_backtrace" float(0.013775825500488) string(20) "debug_backtrace full" float(0.0012099742889404)
Output for 5.4.21
string(15) "debug_backtrace" float(0.011052846908569) string(20) "debug_backtrace full" float(0.00094199180603027)
Output for 5.4.20
string(15) "debug_backtrace" float(0.016086101531982) string(20) "debug_backtrace full" float(0.00081110000610352)
Output for 5.4.19
string(15) "debug_backtrace" float(0.015669107437134) string(20) "debug_backtrace full" float(0.0013949871063232)
Output for 5.4.18
string(15) "debug_backtrace" float(0.013625144958496) string(20) "debug_backtrace full" float(0.0011181831359863)
Output for 5.4.17
string(15) "debug_backtrace" float(0.013395071029663) string(20) "debug_backtrace full" float(0.001121997833252)
Output for 5.4.16
string(15) "debug_backtrace" float(0.013929843902588) string(20) "debug_backtrace full" float(0.0010061264038086)
Output for 5.4.15
string(15) "debug_backtrace" float(0.013738870620728) string(20) "debug_backtrace full" float(0.0011680126190186)
Output for 5.4.14
string(15) "debug_backtrace" float(-0.0089490413665771) string(20) "debug_backtrace full" float(0.001147985458374)
Output for 5.4.13
string(15) "debug_backtrace" float(0.019601821899414) string(20) "debug_backtrace full" float(0.0018210411071777)
Output for 5.4.12
string(15) "debug_backtrace" float(0.015007019042969) string(20) "debug_backtrace full" float(0.001162052154541)
Output for 5.4.11
string(15) "debug_backtrace" float(0.014235019683838) string(20) "debug_backtrace full" float(0.0011990070343018)
Output for 5.4.10
string(15) "debug_backtrace" float(0.011008977890015) string(20) "debug_backtrace full" float(0.00094199180603027)
Output for 5.4.9
string(15) "debug_backtrace" float(0.0096700191497803) string(20) "debug_backtrace full" float(0.00084495544433594)
Output for 5.4.8
string(15) "debug_backtrace" float(0.011489152908325) string(20) "debug_backtrace full" float(0.00094795227050781)
Output for 5.4.7
string(15) "debug_backtrace" float(0.015837907791138) string(20) "debug_backtrace full" float(0.0010521411895752)
Output for 5.4.6
string(15) "debug_backtrace" float(0.015865087509155) string(20) "debug_backtrace full" float(0.0013301372528076)
Output for 5.4.5
string(15) "debug_backtrace" float(0.0095000267028809) string(20) "debug_backtrace full" float(0.00083184242248535)
Output for 5.4.4
string(15) "debug_backtrace" float(0.010105133056641) string(20) "debug_backtrace full" float(0.00081801414489746)
Output for 5.4.3
string(15) "debug_backtrace" float(0.015851974487305) string(20) "debug_backtrace full" float(0.0012860298156738)
Output for 5.4.2
string(15) "debug_backtrace" float(0.010083198547363) string(20) "debug_backtrace full" float(0.00087094306945801)
Output for 5.4.1
string(15) "debug_backtrace" float(0.015624046325684) string(20) "debug_backtrace full" float(0.0013070106506348)
Output for 5.4.0
string(15) "debug_backtrace" float(0.016072988510132) string(20) "debug_backtrace full" float(0.0014009475708008)
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/SNTqD on line 3