3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(PHP_VERSION_ID); if(PHP_VERSION_ID <= 504000) { 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(); } $start = microtime(true); var_dump('get_called_class', microtime(true) - $start); } } $foo = new Foo; $foo->recurseBenchCallerContex(10000, 100);
Output for 7.2.0
int(70200)
Output for 7.1.7
int(70107)
Output for 7.1.6
int(70106)
Output for 7.1.5
int(70105)
Output for 7.1.0
int(70100)
Output for 7.0.20
int(70020)
Output for 7.0.14
int(70014)
Output for 7.0.6
int(70006)
Output for 7.0.5
int(70005)
Output for 7.0.4
int(70004)
Output for 7.0.3
int(70003)
Output for 7.0.2
int(70002)
Output for 7.0.1
int(70001)
Output for 7.0.0
int(70000)
Output for 5.6.28
int(50628)
Output for 5.6.21
int(50621)
Output for 5.6.20
int(50620)
Output for 5.6.19
int(50619)
Output for 5.6.18
int(50618)
Output for 5.6.17
int(50617)
Output for 5.6.16
int(50616)
Output for 5.6.15
int(50615)
Output for 5.6.14
int(50614)
Output for 5.6.13
int(50613)
Output for 5.6.12
int(50612)
Output for 5.6.11
int(50611)
Output for 5.6.10
int(50610)
Output for 5.6.9
int(50609)
Output for 5.6.8
int(50608)
Output for 5.5.35
int(50535)
Output for 5.5.34
int(50534)
Output for 5.5.33
int(50533)
Output for 5.5.32
int(50532)
Output for 5.5.31
int(50531)
Output for 5.5.30
int(50530)
Output for 5.5.29
int(50529)
Output for 5.5.28
int(50528)
Output for 5.5.27
int(50527)
Output for 5.5.26
int(50526)
Output for 5.5.25
int(50525)
Output for 5.5.24
int(50524)
Output for 5.4.45
int(50445)
Output for 5.4.44
int(50444)
Output for 5.4.43
int(50443)
Output for 5.4.42
int(50442)
Output for 5.4.41
int(50441)
Output for 5.4.40
int(50440)
Output for 5.4.39
int(50439)
Output for 5.4.38
int(50438)
Output for 5.4.37
int(50437)
Output for 5.4.36
int(50436)
Output for 5.4.35
int(50435)
Output for 5.4.34
int(50434)
Output for 5.4.32
int(50432)
Output for 5.4.31
int(50431)
Output for 5.4.30
int(50430)
Output for 5.4.29
int(50429)
Output for 5.4.28
int(50428)
Output for 5.4.27
int(50427)
Output for 5.4.26
int(50426)
Output for 5.4.25
int(50425)
Output for 5.4.24
int(50424)
Output for 5.4.23
int(50423)
Output for 5.4.22
int(50422)
Output for 5.4.21
int(50421)
Output for 5.4.20
int(50420)
Output for 5.4.19
int(50419)
Output for 5.4.18
int(50418)
Output for 5.4.17
int(50417)
Output for 5.4.16
int(50416)
Output for 5.4.15
int(50415)
Output for 5.4.14
int(50414)
Output for 5.4.13
int(50413)
Output for 5.4.12
int(50412)
Output for 5.4.11
int(50411)
Output for 5.4.10
int(50410)
Output for 5.4.9
int(50409)
Output for 5.4.8
int(50408)
Output for 5.4.7
int(50407)
Output for 5.4.6
int(50406)
Output for 5.4.5
int(50405)
Output for 5.4.4
int(50404)
Output for 5.4.3
int(50403)
Output for 5.4.2
int(50402)
Output for 5.4.1
int(50401)
Output for 5.4.0
int(50400)
Output for 5.3.29
int(50329)
Output for 5.3.28
int(50328)
Output for 5.3.27
int(50327)
Output for 5.3.26
int(50326)
Output for 5.3.25
int(50325)
Output for 5.3.24
int(50324)
Output for 5.3.23
int(50323)
Output for 5.3.22
int(50322)
Output for 5.3.21
int(50321)
Output for 5.3.20
int(50320)
Output for 5.3.19
int(50319)
Output for 5.3.18
int(50318)
Output for 5.3.17
int(50317)
Output for 5.3.16
int(50316)
Output for 5.3.15
int(50315)
Output for 5.3.14
int(50314)
Output for 5.3.13
int(50313)
Output for 5.3.12
int(50312)
Output for 5.3.11
int(50311)
Output for 5.3.10
int(50310)
Output for 5.3.9
int(50309)
Output for 5.3.8
int(50308)
Output for 5.3.7
int(50307)
Output for 5.3.6
int(50306)
Output for 5.3.5
int(50305)
Output for 5.3.4
int(50304)
Output for 5.3.3
int(50303)
Output for 5.3.2
int(50302)
Output for 5.3.1
int(50301)
Output for 5.3.0
int(50300)
Output for 5.2.17
int(50217)
Output for 5.2.16
int(50216)
Output for 5.2.15
int(50215)
Output for 5.2.14
int(50214)
Output for 5.2.13
int(50213)
Output for 5.2.12
int(50212)
Output for 5.2.11
int(50211)
Output for 5.2.10
int(50210)
Output for 5.2.9
int(50209)
Output for 5.2.8
int(50208)
Output for 5.2.7
int(50207)
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.6
Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/LKM9s on line 2 string(14) "PHP_VERSION_ID" Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/LKM9s on line 3

preferences:
151.73 ms | 403 KiB | 174 Q