3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function recurseBenchCallerContex($iterations, $recursionLimit) { if($recursionLimit > 1) { 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); } } $foo = new Foo; $foo->recurseBenchCallerContex(10000, 1);

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.3.120.0100.00314.96
7.3.110.0040.01114.59
7.3.100.0030.01314.62
7.3.90.0060.00914.69
7.3.80.0090.00614.70
7.3.70.0040.01114.80
7.3.60.0100.00714.70
7.3.50.0030.01314.60
7.3.40.0130.00314.76
7.3.30.0090.00614.68
7.3.20.0000.01816.65
7.3.10.0070.00716.50
7.3.00.0040.01416.30
7.2.240.0000.01715.21
7.2.230.0070.00714.99
7.2.220.0100.00715.00
7.2.210.0060.00614.83
7.2.200.0060.01315.13
7.2.190.0030.01014.82
7.2.180.0080.01114.97
7.2.170.0000.01614.97
7.2.160.0150.00415.04
7.2.150.0040.01416.69
7.2.140.0070.01016.82
7.2.130.0060.01016.87
7.2.120.0060.00916.86
7.2.110.0070.01016.81
7.2.100.0070.01116.76
7.2.90.0060.00616.81
7.2.80.0130.00616.80
7.2.70.0100.00316.84
7.2.60.0040.01516.76
7.2.50.0100.00616.78
7.2.40.0030.01216.87
7.2.30.0030.01316.93
7.2.20.0040.01516.86
7.2.10.0030.01616.69
7.2.00.0140.00316.63
7.1.330.0030.01315.88
7.1.320.0100.00315.87
7.1.310.0060.00615.89
7.1.300.0100.00615.66
7.1.290.0040.01215.77
7.1.280.0100.00015.71
7.1.270.0000.01415.75
7.1.260.0090.00615.78
7.1.250.0100.00715.74
7.1.70.0000.00816.99
7.1.60.0100.01319.46
7.1.50.0070.01817.12
7.1.00.0030.08022.39
7.0.200.0040.00416.70
7.0.140.0030.07722.00
7.0.110.0070.04319.95
7.0.100.0570.02320.11
7.0.90.0100.08319.96
7.0.80.0500.05319.88
7.0.70.0100.05720.04
7.0.60.0100.03020.07
7.0.50.0570.06320.03
7.0.40.0030.04019.74
7.0.30.0100.07319.68
7.0.20.0130.06019.86
7.0.10.0070.03319.69
7.0.00.0170.05719.69
5.6.280.0100.07021.11
5.6.260.0100.05720.75
5.6.250.0170.02720.73
5.6.240.0100.05020.57
5.6.230.0070.05020.63
5.6.220.0070.04020.55
5.6.210.0000.06320.68
5.6.200.0030.04320.65
5.6.190.0000.04720.65
5.6.180.0070.03320.57
5.6.170.0070.04020.70
5.6.160.0030.04020.81
5.6.150.0030.03720.64
5.6.140.0070.03720.68
5.6.130.0100.06320.65
5.6.120.0030.04320.55
5.6.110.0170.07720.59
5.6.100.0070.04320.61
5.6.90.0070.03720.45
5.6.80.0030.08320.00
5.6.70.0070.08320.22
5.6.60.0030.05020.01
5.6.50.0100.05020.00
5.6.40.0170.06719.95
5.6.30.0030.04719.83
5.6.20.0070.05320.01
5.6.10.0070.04320.00
5.6.00.0230.05720.21
5.5.380.0030.03717.42
5.5.370.0030.04717.62
5.5.360.0000.08017.50
5.5.350.0070.03717.25
5.5.340.0070.04318.02
5.5.330.0070.03718.09
5.5.320.0030.05318.04
5.5.310.0030.03318.11
5.5.300.0070.07318.10
5.5.290.0070.04017.82
5.5.280.0000.04017.91
5.5.270.0070.03318.04
5.5.260.0030.05318.13
5.5.250.0130.06317.71
5.5.240.0000.07717.20
5.5.230.0100.03317.36
5.5.220.0070.04317.20
5.5.210.0070.03317.43
5.5.200.0000.07017.41
5.5.190.0030.08017.22
5.5.180.0030.04017.26
5.5.160.0000.03717.17
5.5.150.0070.06017.44
5.5.140.0130.05717.47
5.5.130.0070.04317.45
5.5.120.0070.03317.39
5.5.110.0030.03717.26
5.5.100.0030.04017.16
5.5.90.0030.04017.19
5.5.80.0000.04017.28
5.5.70.0070.06017.37
5.5.60.0070.03017.26
5.5.50.0100.06317.22
5.5.40.0100.02717.36
5.5.30.0130.07017.34
5.5.20.0030.03717.28
5.5.10.0030.06717.14
5.5.00.0070.03717.25
5.4.450.0070.03719.21
5.4.440.0070.05319.27
5.4.430.0030.03719.26
5.4.420.0100.03019.32
5.4.410.0030.04019.29
5.4.400.0000.03718.92
5.4.390.0070.05719.04
5.4.380.0100.03319.01
5.4.370.0070.05719.01
5.4.360.0100.02719.10
5.4.350.0100.08318.95
5.4.340.0000.06318.98
5.4.320.0100.07018.91
5.4.310.0070.05318.94
5.4.300.0130.07319.01
5.4.290.0030.04019.00
5.4.280.0070.07319.10
5.4.270.0100.03019.04
5.4.260.0030.04018.98
5.4.250.0070.03319.00
5.4.240.0100.02719.11
5.4.230.0070.04018.95
5.4.220.0070.07018.87
5.4.210.0100.02718.93
5.4.200.0000.07018.90
5.4.190.0030.03319.09
5.4.180.0000.06719.00
5.4.170.0070.04319.00
5.4.160.0000.05718.89
5.4.150.0030.04718.87
5.4.140.0100.03716.33
5.4.130.0070.03316.37
5.4.120.0000.03716.34
5.4.110.0130.04716.32
5.4.100.0070.07716.48
5.4.90.0000.04016.29
5.4.80.0070.03316.48
5.4.70.0130.02716.27
5.4.60.0030.03316.60
5.4.50.0100.05016.36
5.4.40.0100.04016.60
5.4.30.0070.02716.30
5.4.20.0100.02316.31
5.4.10.0070.04016.47
5.4.00.0130.02315.91
5.3.290.0030.07314.65
5.3.280.0100.08014.65
5.3.270.0070.03714.70
5.3.260.0030.04314.65
5.3.250.0070.05014.62
5.3.240.0130.02714.64
5.3.230.0030.06014.46
5.3.220.0100.02714.80
5.3.210.0030.05714.70
5.3.200.0030.03714.80
5.3.190.0000.04014.56
5.3.180.0070.03714.70
5.3.170.0000.04014.54
5.3.160.0030.03714.64
5.3.150.0100.04014.58
5.3.140.0130.02714.55
5.3.130.0030.03714.68
5.3.120.0000.04314.57
5.3.110.0100.02714.58
5.3.100.0030.04314.27
5.3.90.0000.04014.27
5.3.80.0030.06314.27
5.3.70.0070.04314.27
5.3.60.0030.04014.27
5.3.50.0000.04314.27
5.3.40.0000.04014.27
5.3.30.0030.04314.27
5.3.20.0030.07714.27
5.3.10.0100.06714.27
5.3.00.0000.04314.27
5.2.170.0000.03314.27
5.2.160.0000.04014.27
5.2.150.0030.03014.27
5.2.140.0000.05714.27
5.2.130.0070.03714.27
5.2.120.0000.02714.27
5.2.110.0000.04014.27
5.2.100.0030.04714.27
5.2.90.0000.02714.27
5.2.80.0000.03714.27
5.2.70.0030.02714.27
5.2.60.0000.03314.27
5.2.50.0030.02314.27
5.2.40.0100.04014.27
5.2.30.0100.05014.27
5.2.20.0030.03314.27
5.2.10.0100.05014.27
5.2.00.0070.04014.27
5.1.60.0000.04014.27
5.1.50.0030.05314.27
5.1.40.0000.03014.27
5.1.30.0030.05314.27
5.1.20.0070.03314.27
5.1.10.0030.03714.27
5.1.00.0000.03014.27
5.0.50.0000.03014.27
5.0.40.0000.04014.27
5.0.30.0070.06314.27
5.0.20.0030.04014.27
5.0.10.0030.03714.27
5.0.00.0070.04014.27
4.4.90.0030.01314.27
4.4.80.0030.01314.27
4.4.70.0000.01714.27
4.4.60.0000.01314.27
4.4.50.0030.01314.27
4.4.40.0000.02714.27
4.4.30.0000.02714.27
4.4.20.0030.03314.27
4.4.10.0000.03714.27
4.4.00.0000.04014.27
4.3.110.0000.03014.27
4.3.100.0000.03014.27
4.3.90.0000.02014.27
4.3.80.0030.03714.27
4.3.70.0100.02714.27
4.3.60.0000.02714.27
4.3.50.0000.04714.27
4.3.40.0030.04014.27
4.3.30.0000.01714.27
4.3.20.0000.03714.27
4.3.10.0000.03014.27
4.3.00.0000.01314.27

preferences:
37.83 ms | 404 KiB | 6 Q