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(1000, 100);
based on SNTqD
Output for 7.1.0
string(15) "debug_backtrace" float(0.00047898292541504) string(20) "debug_backtrace full" float(3.9100646972656E-5)
Output for 7.0.14
string(15) "debug_backtrace" float(0.00090789794921875) string(20) "debug_backtrace full" float(6.7949295043945E-5)
Output for 7.0.6
string(15) "debug_backtrace" float(0.00078511238098145) string(20) "debug_backtrace full" float(5.6028366088867E-5)
Output for 7.0.5
string(15) "debug_backtrace" float(0.00081801414489746) string(20) "debug_backtrace full" float(5.1021575927734E-5)
Output for 7.0.4
string(15) "debug_backtrace" float(0.00053310394287109) string(20) "debug_backtrace full" float(2.3841857910156E-5)
Output for 7.0.3
string(15) "debug_backtrace" float(0.00057196617126465) string(20) "debug_backtrace full" float(3.504753112793E-5)
Output for 7.0.2
string(15) "debug_backtrace" float(0.00058722496032715) string(20) "debug_backtrace full" float(4.1961669921875E-5)
Output for 7.0.1
string(15) "debug_backtrace" float(0.00064516067504883) string(20) "debug_backtrace full" float(2.6941299438477E-5)
Output for 7.0.0
string(15) "debug_backtrace" float(0.00064802169799805) string(20) "debug_backtrace full" float(2.3126602172852E-5)
Output for 5.6.28
string(15) "debug_backtrace" float(0.0018072128295898) string(20) "debug_backtrace full" float(0.00014996528625488)
Output for 5.6.21
string(15) "debug_backtrace" float(0.0012619495391846) string(20) "debug_backtrace full" float(0.00010490417480469)
Output for 5.6.20
string(15) "debug_backtrace" float(0.001514196395874) string(20) "debug_backtrace full" float(0.00013089179992676)
Output for 5.6.19
string(15) "debug_backtrace" float(0.0012319087982178) string(20) "debug_backtrace full" float(9.8943710327148E-5)
Output for 5.6.18
string(15) "debug_backtrace" float(0.001215934753418) string(20) "debug_backtrace full" float(9.8943710327148E-5)
Output for 5.6.17
string(15) "debug_backtrace" float(0.0010740756988525) string(20) "debug_backtrace full" float(9.4890594482422E-5)
Output for 5.6.16
string(15) "debug_backtrace" float(0.00093293190002441) string(20) "debug_backtrace full" float(7.4148178100586E-5)
Output for 5.6.15
string(15) "debug_backtrace" float(0.0014631748199463) string(20) "debug_backtrace full" float(0.00011587142944336)
Output for 5.6.14
string(15) "debug_backtrace" float(0.0014829635620117) string(20) "debug_backtrace full" float(0.00011897087097168)
Output for 5.6.13
string(15) "debug_backtrace" float(0.0010948181152344) string(20) "debug_backtrace full" float(9.0122222900391E-5)
Output for 5.6.12
string(15) "debug_backtrace" float(0.0014679431915283) string(20) "debug_backtrace full" float(0.00011801719665527)
Output for 5.6.11
string(15) "debug_backtrace" float(0.0014889240264893) string(20) "debug_backtrace full" float(0.00011181831359863)
Output for 5.6.10
string(15) "debug_backtrace" float(0.0014400482177734) string(20) "debug_backtrace full" float(0.00013899803161621)
Output for 5.6.9
string(15) "debug_backtrace" float(0.001507043838501) string(20) "debug_backtrace full" float(0.00014090538024902)
Output for 5.6.8
string(15) "debug_backtrace" float(0.001190185546875) string(20) "debug_backtrace full" float(7.7962875366211E-5)
Output for 5.5.35
string(15) "debug_backtrace" float(0.0014240741729736) string(20) "debug_backtrace full" float(0.00011110305786133)
Output for 5.5.34
string(15) "debug_backtrace" float(0.0011589527130127) string(20) "debug_backtrace full" float(0.00010800361633301)
Output for 5.5.33
string(15) "debug_backtrace" float(0.0009770393371582) string(20) "debug_backtrace full" float(7.7009201049805E-5)
Output for 5.5.32
string(15) "debug_backtrace" float(0.001086950302124) string(20) "debug_backtrace full" float(8.7976455688477E-5)
Output for 5.5.31
string(15) "debug_backtrace" float(0.0011999607086182) string(20) "debug_backtrace full" float(9.7990036010742E-5)
Output for 5.5.30
string(15) "debug_backtrace" float(0.0014219284057617) string(20) "debug_backtrace full" float(0.00011396408081055)
Output for 5.5.29
string(15) "debug_backtrace" float(0.001162052154541) string(20) "debug_backtrace full" float(9.8943710327148E-5)
Output for 5.5.28
string(15) "debug_backtrace" float(0.0015830993652344) string(20) "debug_backtrace full" float(0.00012397766113281)
Output for 5.5.27
string(15) "debug_backtrace" float(0.0014200210571289) string(20) "debug_backtrace full" float(0.00012993812561035)
Output for 5.5.26
string(15) "debug_backtrace" float(0.0011360645294189) string(20) "debug_backtrace full" float(8.8930130004883E-5)
Output for 5.5.25
string(15) "debug_backtrace" float(0.0013840198516846) string(20) "debug_backtrace full" float(0.00011205673217773)
Output for 5.5.24
string(15) "debug_backtrace" float(0.0011539459228516) string(20) "debug_backtrace full" float(8.9883804321289E-5)
Output for 5.4.45
string(15) "debug_backtrace" float(0.0016260147094727) string(20) "debug_backtrace full" float(0.00015091896057129)
Output for 5.4.44
string(15) "debug_backtrace" float(0.0010180473327637) string(20) "debug_backtrace full" float(0.00010490417480469)
Output for 5.4.43
string(15) "debug_backtrace" float(0.002953052520752) string(20) "debug_backtrace full" float(0.00012493133544922)
Output for 5.4.42
string(15) "debug_backtrace" float(0.001619815826416) string(20) "debug_backtrace full" float(0.00014805793762207)
Output for 5.4.41
string(15) "debug_backtrace" float(0.0012471675872803) string(20) "debug_backtrace full" float(0.00011491775512695)
Output for 5.4.40
string(15) "debug_backtrace" float(0.0012650489807129) string(20) "debug_backtrace full" float(0.00011301040649414)
Output for 5.4.39
string(15) "debug_backtrace" float(0.0012490749359131) string(20) "debug_backtrace full" float(0.00014209747314453)
Output for 5.4.38
string(15) "debug_backtrace" float(0.0019290447235107) string(20) "debug_backtrace full" float(0.00013899803161621)
Output for 5.4.37
string(15) "debug_backtrace" float(0.0021610260009766) string(20) "debug_backtrace full" float(0.00011587142944336)
Output for 5.4.36
string(15) "debug_backtrace" float(0.0020730495452881) string(20) "debug_backtrace full" float(0.00011706352233887)
Output for 5.4.35
string(15) "debug_backtrace" float(0.0094180107116699) string(20) "debug_backtrace full" float(0.00019097328186035)
Output for 5.4.34
string(15) "debug_backtrace" float(0.0015490055084229) string(20) "debug_backtrace full" float(0.00012397766113281)
Output for 5.4.32
string(15) "debug_backtrace" float(0.0011930465698242) string(20) "debug_backtrace full" float(9.2983245849609E-5)
Output for 5.4.31
string(15) "debug_backtrace" float(0.0011498928070068) string(20) "debug_backtrace full" float(0.00010204315185547)
Output for 5.4.30
string(15) "debug_backtrace" float(0.0011599063873291) string(20) "debug_backtrace full" float(9.2983245849609E-5)
Output for 5.4.29
string(15) "debug_backtrace" float(0.0011451244354248) string(20) "debug_backtrace full" float(0.00014805793762207)
Output for 5.4.28
string(15) "debug_backtrace" float(0.0012459754943848) string(20) "debug_backtrace full" float(0.00011992454528809)
Output for 5.4.27
string(15) "debug_backtrace" float(0.0012578964233398) string(20) "debug_backtrace full" float(8.9168548583984E-5)
Output for 5.4.26
string(15) "debug_backtrace" float(0.001215934753418) string(20) "debug_backtrace full" float(8.8930130004883E-5)
Output for 5.4.25
string(15) "debug_backtrace" float(0.0011491775512695) string(20) "debug_backtrace full" float(8.7976455688477E-5)
Output for 5.4.24
string(15) "debug_backtrace" float(0.0015759468078613) string(20) "debug_backtrace full" float(0.00024199485778809)
Output for 5.4.23
string(15) "debug_backtrace" float(0.0012011528015137) string(20) "debug_backtrace full" float(9.8943710327148E-5)
Output for 5.4.22
string(15) "debug_backtrace" float(0.0011541843414307) string(20) "debug_backtrace full" float(8.6069107055664E-5)
Output for 5.4.21
string(15) "debug_backtrace" float(0.0011959075927734) string(20) "debug_backtrace full" float(8.6069107055664E-5)
Output for 5.4.20
string(15) "debug_backtrace" float(0.0011968612670898) string(20) "debug_backtrace full" float(8.5830688476562E-5)
Output for 5.4.19
string(15) "debug_backtrace" float(0.0011961460113525) string(20) "debug_backtrace full" float(9.8943710327148E-5)
Output for 5.4.18
string(15) "debug_backtrace" float(0.0013389587402344) string(20) "debug_backtrace full" float(0.00011897087097168)
Output for 5.4.17
string(15) "debug_backtrace" float(0.0011661052703857) string(20) "debug_backtrace full" float(0.0001220703125)
Output for 5.4.16
string(15) "debug_backtrace" float(0.001317024230957) string(20) "debug_backtrace full" float(8.2015991210938E-5)
Output for 5.4.15
string(15) "debug_backtrace" float(0.0011420249938965) string(20) "debug_backtrace full" float(0.00014400482177734)
Output for 5.4.14
string(15) "debug_backtrace" float(0.0011532306671143) string(20) "debug_backtrace full" float(8.392333984375E-5)
Output for 5.4.13
string(15) "debug_backtrace" float(0.0011382102966309) string(20) "debug_backtrace full" float(0.00010204315185547)
Output for 5.4.12
string(15) "debug_backtrace" float(0.0012810230255127) string(20) "debug_backtrace full" float(0.0001521110534668)
Output for 5.4.11
string(15) "debug_backtrace" float(0.0012741088867188) string(20) "debug_backtrace full" float(0.0001530647277832)
Output for 5.4.10
string(15) "debug_backtrace" float(0.0012810230255127) string(20) "debug_backtrace full" float(0.00012803077697754)
Output for 5.4.9
string(15) "debug_backtrace" float(0.00124192237854) string(20) "debug_backtrace full" float(8.8930130004883E-5)
Output for 5.4.8
string(15) "debug_backtrace" float(0.0011980533599854) string(20) "debug_backtrace full" float(0.0001070499420166)
Output for 5.4.7
string(15) "debug_backtrace" float(0.001230001449585) string(20) "debug_backtrace full" float(0.00010108947753906)
Output for 5.4.6
string(15) "debug_backtrace" float(0.0012872219085693) string(20) "debug_backtrace full" float(0.00015592575073242)
Output for 5.4.5
string(15) "debug_backtrace" float(0.0012199878692627) string(20) "debug_backtrace full" float(9.7036361694336E-5)
Output for 5.4.4
string(15) "debug_backtrace" float(0.0012409687042236) string(20) "debug_backtrace full" float(0.00010585784912109)
Output for 5.4.3
string(15) "debug_backtrace" float(0.0012531280517578) string(20) "debug_backtrace full" float(0.00010204315185547)
Output for 5.4.2
string(15) "debug_backtrace" float(0.0012710094451904) string(20) "debug_backtrace full" float(8.5115432739258E-5)
Output for 5.4.1
string(15) "debug_backtrace" float(0.0012731552124023) string(20) "debug_backtrace full" float(9.918212890625E-5)
Output for 5.4.0
string(15) "debug_backtrace" float(0.0013539791107178) string(20) "debug_backtrace full" float(8.7976455688477E-5)
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/pRPe8 on line 3