3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ABD\dsgsdgf\sd; 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', $trace, 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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.0.110.0050.00816.94
8.0.100.0060.00616.84
8.0.90.0060.00617.01
8.0.80.0100.01617.04
8.0.70.0000.01216.96
8.0.60.0040.00817.02
8.0.50.0000.01217.01
8.0.30.0110.01517.05
8.0.20.0130.01517.40
8.0.10.0000.01217.05
8.0.00.0170.00716.81
7.4.240.0020.01016.65
7.4.230.0040.00816.57
7.4.220.0190.02016.69
7.4.210.0030.02016.73
7.4.200.0060.00616.67
7.4.160.0130.01916.54
7.4.150.0090.01517.40
7.4.140.0100.01317.86
7.4.130.0090.01416.69
7.4.120.0130.01216.63
7.4.110.0090.01516.74
7.4.100.0130.01016.71
7.4.90.0070.01716.70
7.4.80.0140.02319.39
7.4.70.0030.02016.68
7.4.60.0000.02316.48
7.4.50.0030.01216.39
7.4.40.0090.01316.59
7.4.30.0100.01316.79
7.4.10.0070.01815.13
7.4.00.0080.01415.13
7.3.300.0030.00916.32
7.3.290.0070.01316.41
7.3.280.0130.01816.46
7.3.270.0150.01217.40
7.3.260.0130.01016.75
7.3.250.0070.01716.64
7.3.240.0130.02016.67
7.3.230.0130.01016.77
7.3.210.0110.01416.59
7.3.200.0070.01719.39
7.3.190.0100.02016.44
7.3.180.0110.01116.55
7.3.170.0060.01716.71
7.3.160.0070.01716.56
7.3.130.0100.01614.89
7.3.120.0110.01414.89
7.3.110.0100.01714.81
7.3.100.0060.01615.09
7.3.90.0090.00915.19
7.3.80.0090.00915.01
7.3.70.0070.01414.95
7.3.60.0080.00814.70
7.3.50.0030.01315.02
7.3.40.0000.01914.69
7.3.30.0000.02514.86
7.3.20.0130.01016.75
7.3.10.0070.01016.61
7.3.00.0030.01716.43
7.2.330.0120.01516.45
7.2.320.0030.02116.94
7.2.310.0100.01716.92
7.2.300.0110.02516.52
7.2.290.0090.01516.63
7.2.260.0070.02015.01
7.2.250.0090.01915.12
7.2.240.0140.01015.10
7.2.230.0060.01615.31
7.2.220.0130.01015.27
7.2.210.0090.01215.18
7.2.200.0030.01614.96
7.2.190.0100.01415.12
7.2.180.0070.01414.84
7.2.170.0000.02215.29
7.2.160.0030.01915.11
7.2.150.0030.01617.10
7.2.140.0000.01916.75
7.2.130.0100.01017.01
7.2.120.0040.01816.79
7.2.110.0060.01217.07
7.2.100.0090.01216.84
7.2.90.0100.01316.91
7.2.80.0070.01416.74
7.2.70.0100.01617.01
7.2.60.0080.01316.88
7.2.50.0040.01216.80
7.2.40.0040.02216.85
7.2.30.0040.01816.80
7.2.20.0030.01517.08
7.2.10.0070.01716.94
7.2.00.0020.01818.04
7.1.330.0060.01615.96
7.1.320.0000.02515.74
7.1.310.0060.01815.93
7.1.300.0100.01315.94
7.1.290.0100.01415.79
7.1.280.0030.02115.88
7.1.270.0070.01715.85
7.1.260.0100.01315.88
7.1.250.0100.01315.63
7.1.240.0100.01315.94
7.1.230.0000.02215.75
7.1.220.0090.01515.91
7.1.210.0040.01815.91
7.1.200.0060.01115.88
7.1.190.0070.01415.84
7.1.180.0090.02115.86
7.1.170.0040.01815.86
7.1.160.0070.01415.98
7.1.150.0030.01915.80
7.1.140.0000.01915.76
7.1.130.0060.01815.93
7.1.120.0040.01815.84
7.1.110.0040.01215.94
7.1.100.0020.01917.00
7.1.90.0000.02215.81
7.1.80.0060.01315.63
7.1.70.0040.01416.59
7.1.60.0090.02117.71
7.1.50.0090.01916.33
7.1.40.0030.01615.84
7.1.30.0100.01015.91
7.1.20.0110.01115.96
7.1.10.0130.01015.95
7.1.00.0070.04819.20
7.0.330.0030.02615.64
7.0.320.0100.02415.27
7.0.310.0070.02415.20
7.0.300.0100.02315.53
7.0.290.0030.02315.64
7.0.280.0100.02315.54
7.0.270.0060.02515.43
7.0.260.0060.02215.11
7.0.250.0030.03115.45
7.0.240.0040.02515.50
7.0.230.0060.02615.44
7.0.220.0060.02415.48
7.0.210.0030.03215.40
7.0.200.0020.02516.08
7.0.190.0030.02615.23
7.0.180.0000.02915.51
7.0.170.0000.02815.23
7.0.160.0030.02715.54
7.0.150.0030.03415.55
7.0.140.0020.06218.70
7.0.130.0040.02815.27
7.0.120.0100.02215.37
7.0.110.0030.02715.21
7.0.100.0030.02715.35
7.0.90.0030.02815.54
7.0.80.0000.03215.38
7.0.70.0000.03415.50
7.0.60.0020.06417.70
7.0.50.0100.06116.76
7.0.40.0070.04716.87
7.0.30.0170.04016.76
7.0.20.0180.04116.90
7.0.10.0050.06316.73
7.0.00.0030.04016.82
5.6.400.0100.03514.62
5.6.390.0070.03914.50
5.6.380.0100.04414.75
5.6.370.0070.04114.29
5.6.360.0100.04214.42
5.6.350.0000.04214.86
5.6.340.0060.03914.75
5.6.330.0000.04314.67
5.6.320.0000.04114.84
5.6.310.0140.03114.69
5.6.300.0070.04414.59
5.6.290.0060.04414.57
5.6.280.0000.07517.90
5.6.270.0070.04314.67
5.6.260.0110.03514.62
5.6.250.0100.03614.89
5.6.240.0070.04014.47
5.6.230.0030.04214.61
5.6.220.0070.04014.62
5.6.210.0050.05417.70
5.6.200.0070.08116.29
5.6.190.0050.06217.55
5.6.180.0150.05817.67
5.6.170.0130.07217.57
5.6.160.0030.07517.57
5.6.150.0030.04716.50
5.6.140.0090.06616.59
5.6.130.0060.04716.41
5.6.120.0020.07717.91
5.6.110.0050.07517.78
5.6.100.0100.07217.78
5.6.90.0070.07517.73
5.6.80.0050.05817.66
5.6.70.0030.04014.38
5.6.60.0030.04414.26
5.6.50.0000.04714.43
5.6.40.0070.04014.55
5.6.30.0060.04214.55
5.6.20.0030.04114.38
5.6.10.0100.03714.70
5.6.00.0070.03914.46
5.5.380.0130.03214.54
5.5.370.0000.04414.59
5.5.360.0100.03614.57
5.5.350.0050.05417.63
5.5.340.0060.04716.12
5.5.330.0100.07217.40
5.5.320.0100.06817.25
5.5.310.0200.06017.41
5.5.300.0080.07116.29
5.5.290.0030.05016.32
5.5.280.0050.06117.63
5.5.270.0100.07417.53
5.5.260.0030.07417.92
5.5.250.0020.07617.57
5.5.240.1910.04417.45
5.5.230.0030.04314.38
5.5.220.0040.03914.64
5.5.210.0130.03014.27
5.5.200.0070.03814.66
5.5.190.0070.03614.28
5.5.180.0070.03514.45
5.5.170.0030.04114.42
5.5.160.0100.03714.48
5.5.150.0000.04114.30
5.5.140.0130.03214.63
5.5.130.0000.04614.54
5.5.120.0100.04014.80
5.5.110.0000.04614.84
5.5.100.0000.04514.18
5.5.90.0030.04014.51
5.5.80.0000.04614.57
5.5.70.0060.03814.20
5.5.60.0030.03414.20
5.5.50.0000.04114.16
5.5.40.0070.04014.19
5.5.30.0100.03614.56
5.5.20.0070.03814.38
5.5.10.0000.04714.20
5.5.00.0030.04314.57
5.4.450.0120.04615.25
5.4.440.0100.04915.47
5.4.430.0120.05515.47
5.4.420.0070.05515.38
5.4.410.0160.04215.53
5.4.400.0130.04415.02
5.4.390.0160.05915.26
5.4.380.0100.05515.12
5.4.370.0120.05015.12
5.4.360.0130.04815.22
5.4.350.0180.06515.35
5.4.340.0130.06315.05
5.4.330.0000.04311.10
5.4.320.0100.05515.21
5.4.310.0130.04515.18
5.4.300.0100.04515.10
5.4.290.0170.06515.23
5.4.280.0150.06615.32
5.4.270.0120.07015.31
5.4.260.0120.06215.10
5.4.250.0130.04815.08
5.4.240.0120.04715.20
5.4.230.0150.04615.34
5.4.220.0120.04515.29
5.4.210.0120.06715.07
5.4.200.0120.05515.23
5.4.190.0180.06415.17
5.4.180.0150.05815.14
5.4.170.0150.06415.22
5.4.160.0280.04815.25
5.4.150.0200.06115.17
5.4.140.0170.04613.88
5.4.130.0120.05313.87
5.4.120.0150.06514.01
5.4.110.0150.07014.01
5.4.100.0170.06613.97
5.4.90.0170.06313.93
5.4.80.0180.06613.76
5.4.70.0180.05913.72
5.4.60.0200.05813.90
5.4.50.0180.06413.76
5.4.40.0150.04513.88
5.4.30.0170.06413.78
5.4.20.0200.06413.73
5.4.10.0230.05113.92
5.4.00.0180.06913.46
5.3.290.0400.07014.70
5.3.280.0270.06014.53
5.3.270.0270.07014.70
5.3.260.0270.06014.70
5.3.250.0370.03714.61
5.3.240.0270.07314.59
5.3.230.0270.07014.60
5.3.220.0270.05314.59
5.3.210.0270.07314.68
5.3.200.0330.07014.59
5.3.190.0270.06714.52
5.3.180.0300.04314.49
5.3.170.0300.06714.63
5.3.160.0270.07014.48
5.3.150.0170.04014.58
5.3.140.0230.03714.48
5.3.130.0370.05014.48
5.3.120.0170.04314.46
5.3.110.0230.05014.53
5.3.100.0270.06014.28
5.3.90.0270.07313.89
5.3.80.0330.04314.04
5.3.70.0230.04313.95
5.3.60.0270.07013.94
5.3.50.0230.03713.89
5.3.40.0270.04013.96
5.3.30.0200.03713.97
5.3.20.0200.03713.62
5.3.10.0170.05013.60
5.3.00.0270.06713.57
5.2.170.0200.04312.68
5.2.160.0230.03312.68
5.2.150.0270.05712.68
5.2.140.0230.05312.68
5.2.130.0270.03312.68
5.2.120.0330.05012.68
5.2.110.0200.03712.68
5.2.100.0170.05312.68
5.2.90.0270.04712.68
5.2.80.0170.04012.68
5.2.70.0230.05712.68
5.2.60.0000.06712.68
5.2.50.0070.04712.68
5.2.40.0130.06012.68
5.2.30.0230.03012.68
5.2.20.0230.04712.68
5.2.10.0230.03012.68
5.2.00.0170.05312.68
5.1.60.0170.03012.68
5.1.50.0200.02712.68
5.1.40.0200.03712.68
5.1.30.0200.05012.68
5.1.20.0200.04312.68
5.1.10.0130.03012.68
5.1.00.0130.02312.68
5.0.50.0070.04012.68
5.0.40.0070.04712.68
5.0.30.0100.03012.68
5.0.20.0070.02012.68
5.0.10.0100.01712.68
5.0.00.0030.04312.68
4.4.90.0100.02312.68
4.4.80.0170.02712.68
4.4.70.0100.02312.68
4.4.60.0070.01712.68
4.4.50.0070.01312.68
4.4.40.0070.04712.68
4.4.30.0100.02012.68
4.4.20.0070.02012.68
4.4.10.0070.02312.68
4.4.00.0030.05012.68
4.3.110.0130.02312.68
4.3.100.0130.02712.68
4.3.90.0070.03012.68
4.3.80.0170.04312.68
4.3.70.0070.02012.68
4.3.60.0100.03012.68
4.3.50.0100.02712.68
4.3.40.0100.05012.68
4.3.30.0100.03012.68
4.3.20.0030.03712.68
4.3.10.0030.03012.68
4.3.00.0070.02312.68

preferences:
40.01 ms | 400 KiB | 5 Q