3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function recurseBenchCallerContex($iterations, $recursionLimit) { if($recursionLimit > 0) { $this->recurseBenchCallerContex($iterations, $recursionLimit - 1); } $start = microtime(true); for($c = 0; $c < $iterations; $c++) { $class = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['class']; } 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(1, 0);

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)
7.4.10.0030.01615.01
7.4.00.0110.00615.09
7.3.130.0040.01214.90
7.3.120.0080.00715.36
7.3.110.0080.00615.33
7.3.100.0060.00715.40
7.3.90.0060.00815.38
7.3.80.0050.01015.39
7.3.70.0040.01015.24
7.3.60.0060.00815.29
7.3.50.0070.00515.38
7.3.40.0060.00815.39
7.3.30.0040.01015.31
7.3.20.0050.01116.82
7.3.10.0090.00716.71
7.3.00.0070.00816.66
7.2.260.0100.01014.67
7.2.250.0060.01214.95
7.2.240.0040.01015.58
7.2.230.0050.00815.46
7.2.220.0050.00915.52
7.2.210.0050.00715.54
7.2.200.0050.00815.44
7.2.190.0060.00815.45
7.2.180.0050.01015.39
7.2.170.0040.00915.36
7.2.160.0050.00815.48
7.2.150.0070.01016.85
7.2.140.0060.01116.83
7.2.130.0070.00616.89
7.2.120.0050.01216.89
7.2.110.0030.01316.79
7.2.100.0100.00416.91
7.2.90.0060.00817.00
7.2.80.0070.00816.87
7.2.70.0060.01016.94
7.2.60.0030.01216.97
7.2.50.0090.00816.91
7.2.40.0060.00916.90
7.2.30.0070.00816.98
7.2.20.0060.00916.93
7.2.10.0060.00916.96
7.2.00.0050.01017.43
7.1.330.0060.00816.15
7.1.320.0030.01216.10
7.1.310.0040.01116.00
7.1.300.0040.00816.09
7.1.290.0050.00716.07
7.1.280.0070.00516.00
7.1.270.0040.00916.08
7.1.260.0070.00716.03
7.1.250.0070.00716.03
7.1.240.0060.01015.97
7.1.230.0030.00915.54
7.1.220.0100.00315.89
7.1.210.0100.00315.82
7.1.200.0030.01215.87
7.1.190.0030.01015.85
7.1.180.0150.00015.82
7.1.170.0030.01015.78
7.1.160.0040.00815.93
7.1.150.0040.00415.80
7.1.140.0040.01115.59
7.1.130.0080.00315.96
7.1.120.0060.00615.62
7.1.110.0030.01115.97
7.1.100.0080.00316.02
7.1.90.0070.00315.62
7.1.80.0040.01215.71
7.1.70.0080.00516.42
7.1.60.0070.01017.68
7.1.50.0050.01216.48
7.1.40.0030.01015.82
7.1.30.0070.01015.43
7.1.20.0000.01615.62
7.1.10.0050.00515.84
7.1.00.0070.03819.00
7.0.330.0160.00015.49
7.0.320.0090.00615.57
7.0.310.0060.00315.47
7.0.300.0040.00715.11
7.0.290.0060.00615.39
7.0.280.0060.00315.48
7.0.270.0030.00915.28
7.0.260.0030.00915.47
7.0.250.0060.00315.38
7.0.240.0030.00715.48
7.0.230.0090.00615.29
7.0.220.0110.00415.46
7.0.210.0000.01115.27
7.0.200.0020.00815.92
7.0.190.0000.01415.52
7.0.180.0060.01015.47
7.0.170.0070.00714.92
7.0.160.0030.01015.45
7.0.150.0110.00415.47
7.0.140.0100.03318.63
7.0.130.0030.01015.58
7.0.120.0080.00815.14
7.0.110.0090.00315.34
7.0.100.0030.00915.21
7.0.90.0030.01315.33
7.0.80.0000.00915.33
7.0.70.0000.00815.44
7.0.60.0070.04717.76
7.0.50.0050.02216.71
7.0.40.0130.04316.84
7.0.30.0100.04116.78
7.0.20.0140.02216.72
7.0.10.0070.03216.90
7.0.00.0030.03616.79
5.6.400.0090.00314.37
5.6.390.0070.00714.39
5.6.380.0000.00914.48
5.6.370.0000.00914.30
5.6.360.0000.01114.67
5.6.350.0110.00414.63
5.6.340.0080.00814.64
5.6.330.0060.00614.27
5.6.320.0000.01514.60
5.6.310.0070.00714.64
5.6.300.0030.01014.41
5.6.290.0030.00914.68
5.6.280.0040.04217.52
5.6.270.0050.00514.30
5.6.260.0060.00914.34
5.6.250.0030.01014.68
5.6.240.0100.00314.39
5.6.230.0030.01114.24
5.6.220.0060.00614.30
5.6.210.0070.04617.52
5.6.200.0050.04516.27
5.6.190.0070.04817.35
5.6.180.0190.03317.44
5.6.170.0100.04117.40
5.6.160.0080.04417.32
5.6.150.0050.02516.26
5.6.140.0020.02916.35
5.6.130.0020.02916.28
5.6.120.0050.04917.79
5.6.110.0130.04117.75
5.6.100.0040.02617.67
5.6.90.0100.04517.69
5.6.80.0060.04517.40
5.6.70.2220.02717.49
5.6.60.0000.01414.30
5.6.50.0090.00614.46
5.6.40.0090.00614.20
5.6.30.0090.00614.36
5.6.20.0070.00714.48
5.6.10.0030.01014.13
5.6.00.0060.00614.25
5.5.380.0030.00514.62
5.5.370.0030.01014.43
5.5.360.0000.01614.22
5.5.350.0070.04517.26
5.5.340.0020.04716.16
5.5.330.0100.03917.15
5.5.320.0150.04317.34
5.5.310.0180.04417.47
5.5.300.0030.03316.21
5.5.290.0090.03016.23
5.5.280.0070.04717.65
5.5.270.0050.05317.59
5.5.260.0100.03117.51
5.5.250.0060.04517.37
5.5.240.0070.02917.35
5.5.230.0000.01114.00
5.5.220.0060.00414.38
5.5.210.0000.01514.09
5.5.200.0000.01514.25
5.5.190.0080.00414.26
5.5.180.0060.01514.39
5.5.170.0070.00414.10
5.5.160.0100.00314.06
5.5.150.0120.00414.33
5.5.140.0100.00714.43
5.5.130.0060.00614.49
5.5.120.0030.01314.39
5.5.110.0100.00614.18
5.5.100.0070.00414.28
5.5.90.0100.00314.05
5.5.80.0000.01314.39
5.5.70.0000.01613.78
5.5.60.0070.01014.48
5.5.50.0080.00813.98
5.5.40.0070.00313.83
5.5.30.0080.00814.35
5.5.20.0120.00314.28
5.5.10.0030.00614.26
5.5.00.0070.00714.42
5.4.450.0120.02515.33
5.4.440.0260.02515.08
5.4.430.0230.02515.15
5.4.420.0200.02415.29
5.4.410.0160.02615.21
5.4.400.0270.01815.02
5.4.390.0220.02615.00
5.4.380.0220.03514.92
5.4.370.0280.02914.78
5.4.360.0230.03114.85
5.4.350.0300.03214.93
5.4.340.0230.03914.82
5.4.330.0040.00710.80
5.4.320.0060.02411.81
5.4.310.0070.02211.75
5.4.300.0020.02411.75
5.4.290.0060.02011.80
5.4.280.0100.01611.76
5.4.270.0050.02211.60
5.4.260.0060.02211.70
5.4.250.0060.02111.72
5.4.240.0080.02011.61
5.4.230.0080.01911.74
5.4.220.0060.02311.74
5.4.210.0080.01911.64
5.4.200.0040.02611.62
5.4.190.0100.01811.59
5.4.180.0040.01811.71
5.4.170.0030.02111.71
5.4.160.0040.02011.80
5.4.150.0080.02011.70
5.4.140.0070.02111.61
5.4.130.0030.02111.61
5.4.120.0040.02211.58
5.4.110.0060.01811.46
5.4.100.0040.02311.24
5.4.90.0040.02411.37
5.4.80.0040.02011.38
5.4.70.0050.02011.38
5.4.60.0040.01911.37
5.4.50.0040.01811.45
5.4.40.0020.02311.46
5.4.30.0060.02011.39
5.4.20.0060.01911.44
5.4.10.0060.02111.37
5.4.00.0020.02611.31
5.3.290.0050.04012.80
5.3.280.0070.04312.71
5.3.270.0100.03912.72
5.3.260.0060.03812.72
5.3.250.0030.03912.72
5.3.240.0040.03812.72
5.3.230.0050.03712.71
5.3.220.0060.03912.68
5.3.210.0060.04212.68
5.3.200.0060.03612.68
5.3.190.0060.03712.68
5.3.180.0060.03512.68
5.3.170.0050.03712.67
5.3.160.0080.03312.67
5.3.150.0050.03812.68
5.3.140.0040.04212.66
5.3.130.0060.04212.66
5.3.120.0070.05312.66
5.3.110.0100.04612.66
5.3.100.0080.05012.13
5.3.90.0050.03712.11
5.3.80.0070.03412.09
5.3.70.0050.03612.10
5.3.60.0080.03512.08
5.3.50.0030.04512.03
5.3.40.0080.03912.03
5.3.30.0060.03311.99
5.3.20.0040.03611.77
5.3.10.0050.03411.73
5.3.00.0060.03411.72
5.2.170.0060.0289.23
5.2.160.0030.0299.23
5.2.150.0040.0299.22
5.2.140.0070.0279.21
5.2.130.0060.0269.18
5.2.120.0040.0289.18
5.2.110.0040.0299.19
5.2.100.0030.0299.18
5.2.90.0040.0289.18
5.2.80.0040.0299.18
5.2.70.0060.0289.18
5.2.60.0040.0359.13
5.2.50.0020.0319.10
5.2.40.0050.0279.07
5.2.30.0020.0319.05
5.2.20.0060.0299.04
5.2.10.0070.0288.95
5.2.00.0060.0298.81
5.1.60.0070.0328.09
5.1.50.0030.0278.09
5.1.40.0080.0218.07
5.1.30.0080.0218.42
5.1.20.0060.0248.44
5.1.10.0030.0268.17
5.1.00.0040.0258.17
5.0.50.0020.0216.64
5.0.40.0030.0196.51
5.0.30.0040.0316.32
5.0.20.0050.0186.29
5.0.10.0050.0186.26
5.0.00.0030.0306.26
4.4.90.0020.0164.78
4.4.80.0050.0194.75
4.4.70.0030.0184.75
4.4.60.0030.0154.75
4.4.50.0020.0184.77
4.4.40.0010.0274.71
4.4.30.0030.0154.76
4.4.20.0030.0154.84
4.4.10.0010.0174.85
4.4.00.0030.0264.76
4.3.110.0030.0194.67
4.3.100.0040.0134.66
4.3.90.0010.0154.63
4.3.80.0020.0244.58
4.3.70.0010.0154.63
4.3.60.0030.0144.63
4.3.50.0020.0154.63
4.3.40.0030.0224.54
4.3.30.0020.0173.30
4.3.20.0010.0163.28
4.3.10.0030.0143.25
4.3.00.0170.03315.09

preferences:
38.32 ms | 401 KiB | 5 Q