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)['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.4.10.0070.00716.40
7.4.00.0140.00716.17
7.3.130.0000.02116.34
7.3.120.0070.01416.32
7.3.110.0090.00916.42
7.3.100.0090.00616.15
7.3.90.0070.00716.13
7.3.80.0080.00316.21
7.3.70.0030.00916.32
7.3.60.0090.00616.12
7.3.50.0080.00816.32
7.3.40.0080.00416.21
7.3.30.0140.00716.15
7.3.20.0070.01018.04
7.3.10.0060.00718.11
7.3.00.0040.01218.05
7.2.260.0140.00316.59
7.2.250.0160.00316.34
7.2.240.0090.00616.27
7.2.230.0070.01016.36
7.2.220.0000.01016.55
7.2.210.0070.00716.38
7.2.200.0090.00616.57
7.2.190.0030.01316.51
7.2.180.0090.00316.31
7.2.170.0100.01016.49
7.2.160.0100.01016.48
7.2.150.0040.00818.50
7.2.140.0070.00718.26
7.2.130.0090.00918.25
7.2.120.0000.01118.44
7.2.110.0110.00718.06
7.2.100.0060.01318.35
7.2.90.0110.01118.41
7.2.80.0100.01318.40
7.2.70.0170.00818.32
7.2.60.0090.01318.46
7.2.50.0030.01318.47
7.2.40.0070.01018.44
7.2.30.0100.00718.28
7.2.20.0140.00418.35
7.2.10.0000.01718.32
7.2.00.0090.00618.76
7.1.330.0100.00617.21
7.1.320.0090.00917.52
7.1.310.0080.00817.46
7.1.300.0000.01617.31
7.1.290.0000.01317.20
7.1.280.0100.00717.32
7.1.270.0040.01517.31
7.1.260.0000.01117.19
7.1.250.0060.00917.19
7.1.240.0030.01017.46
7.1.230.0060.00917.29
7.1.220.0070.01017.20
7.1.210.0070.01317.24
7.1.200.0030.01617.06
7.1.190.0140.00317.24
7.1.180.0110.00717.41
7.1.170.0110.00717.30
7.1.160.0100.00717.22
7.1.150.0000.01517.34
7.1.140.0030.01517.29
7.1.130.0040.00817.13
7.1.120.0060.00917.20
7.1.110.0120.00317.20
7.1.100.0100.00617.40
7.1.90.0100.00617.30
7.1.80.0040.01417.38
7.1.70.0030.00816.99
7.1.60.0110.00918.30
7.1.50.0060.01117.16
7.1.40.0150.00417.37
7.1.30.0160.00317.13
7.1.20.0060.00917.36
7.1.10.0100.00617.24
7.1.00.0100.03819.77
7.0.330.0060.00616.93
7.0.320.0040.01116.90
7.0.310.0030.01617.12
7.0.300.0070.01016.81
7.0.290.0060.00916.84
7.0.280.0040.01116.87
7.0.270.0060.01017.01
7.0.260.0120.00316.89
7.0.250.0060.00617.01
7.0.240.0000.01717.04
7.0.230.0030.01217.01
7.0.220.0100.00717.02
7.0.210.0130.00317.07
7.0.200.0030.01016.95
7.0.190.0070.00417.08
7.0.180.0150.00417.28
7.0.170.0060.01217.09
7.0.160.0090.00917.20
7.0.150.0030.01017.09
7.0.140.0030.04319.60
7.0.130.0070.01017.04
7.0.120.0100.01017.04
7.0.110.0100.00617.05
7.0.100.0110.00716.89
7.0.90.0030.01017.13
7.0.80.0030.00917.02
7.0.70.0100.00617.07
7.0.60.0090.04318.56
7.0.50.0060.04017.47
7.0.40.0130.04517.40
7.0.30.0230.03317.38
7.0.20.0050.03117.42
7.0.10.0160.03817.31
7.0.00.0040.02917.31
5.6.400.0030.01016.04
5.6.390.0120.00315.99
5.6.380.0110.00715.84
5.6.370.0110.01115.79
5.6.360.0100.00315.93
5.6.350.0100.00716.08
5.6.340.0070.01116.36
5.6.330.0090.00915.70
5.6.320.0040.01215.88
5.6.310.0040.01515.80
5.6.300.0060.01315.88
5.6.290.0140.00315.83
5.6.280.0050.04418.64
5.6.270.0070.01016.27
5.6.260.0060.00716.00
5.6.250.0090.00616.25
5.6.240.0030.01015.92
5.6.230.0030.00916.08
5.6.220.0030.00916.05
5.6.210.0050.04818.27
5.6.200.0080.04717.05
5.6.190.0080.02218.13
5.6.180.0200.03318.12
5.6.170.0200.04018.21
5.6.160.0060.02918.13
5.6.150.0050.04316.96
5.6.140.0050.03317.01
5.6.130.0090.02517.19
5.6.120.0080.02718.46
5.6.110.0070.04718.59
5.6.100.0120.03918.50
5.6.90.0100.04318.45
5.6.80.0120.04018.29
5.6.70.1570.02018.07
5.6.60.0000.01516.05
5.6.50.0070.01116.04
5.6.40.0070.01015.86
5.6.30.0030.00915.84
5.6.20.0100.00616.03
5.6.10.0110.00715.89
5.6.00.0100.01015.75
5.5.380.0060.00615.86
5.5.370.0040.00815.95
5.5.360.0070.01015.91
5.5.350.0080.05018.00
5.5.340.0050.04616.90
5.5.330.0050.04818.16
5.5.320.0080.03417.94
5.5.310.0130.02118.01
5.5.300.0060.03716.97
5.5.290.0070.02616.97
5.5.280.0080.05018.40
5.5.270.0040.05118.40
5.5.260.0080.02218.30
5.5.250.0080.04218.28
5.5.240.0160.03318.13
5.5.230.0000.01115.84
5.5.220.0130.00715.77
5.5.210.0050.00815.89
5.5.200.0000.01415.86
5.5.190.0040.01115.69
5.5.180.0090.00915.91
5.5.170.0040.01515.89
5.5.160.0130.00316.00
5.5.150.0100.01015.80
5.5.140.0090.01215.86
5.5.130.0070.01415.93
5.5.120.0110.00715.85
5.5.110.0030.01015.98
5.5.100.0190.00015.97
5.5.90.0100.00315.95
5.5.80.0070.00715.66
5.5.70.0070.01015.83
5.5.60.0030.01316.01
5.5.50.0060.00715.86
5.5.40.0030.01015.82
5.5.30.0080.00315.95
5.5.20.0100.00715.86
5.5.10.0060.00915.63
5.5.00.0100.00715.90
5.4.450.0170.02915.98
5.4.440.0290.03016.03
5.4.430.0380.02516.05
5.4.420.0180.03115.86
5.4.410.0160.02815.93
5.4.400.0260.02215.84
5.4.390.0220.02815.80
5.4.380.0170.03615.56
5.4.370.0250.02815.50
5.4.360.0180.03315.61
5.4.350.0200.03115.68
5.4.340.0260.03515.49
5.4.330.0110.00712.50
5.4.320.0150.02312.61
5.4.310.0090.03012.60
5.4.300.0100.02312.49
5.4.290.0050.02412.50
5.4.280.0050.02412.51
5.4.270.0050.02512.54
5.4.260.0050.02412.51
5.4.250.0060.02412.50
5.4.240.0050.02312.47
5.4.230.0050.02612.44
5.4.220.0090.02812.51
5.4.210.0050.02212.47
5.4.200.0060.02212.46
5.4.190.0100.02012.44
5.4.180.0070.02712.48
5.4.170.0090.02112.44
5.4.160.0050.02312.41
5.4.150.0060.02112.41
5.4.140.0070.02112.33
5.4.130.0070.02012.36
5.4.120.0040.02812.31
5.4.110.0090.02212.23
5.4.100.0090.02112.22
5.4.90.0090.02212.33
5.4.80.0120.02212.33
5.4.70.0060.02412.28
5.4.60.0100.02312.24
5.4.50.0060.02712.38
5.4.40.0090.02212.18
5.4.30.0100.01912.07
5.4.20.0060.02212.33
5.4.10.0060.02212.27
5.4.00.0070.02211.98
5.3.290.0050.04012.80
5.3.280.0060.04212.71
5.3.270.0080.04612.73
5.3.260.0070.03912.72
5.3.250.0060.03612.72
5.3.240.0070.04012.72
5.3.230.0090.03812.71
5.3.220.0050.03812.68
5.3.210.0060.04012.68
5.3.200.0050.03812.68
5.3.190.0060.03712.68
5.3.180.0050.04012.67
5.3.170.0070.03612.67
5.3.160.0080.04712.68
5.3.150.0070.03712.67
5.3.140.0090.03812.66
5.3.130.0100.03512.66
5.3.120.0080.03812.66
5.3.110.0050.03912.66
5.3.100.0090.04012.13
5.3.90.0110.04012.11
5.3.80.0080.04612.09
5.3.70.0120.04112.09
5.3.60.0090.03612.08
5.3.50.0060.03912.03
5.3.40.0110.03812.03
5.3.30.0060.03511.99
5.3.20.0050.03611.77
5.3.10.0050.03511.73
5.3.00.0070.03511.72
5.2.170.0060.0289.23
5.2.160.0050.0309.23
5.2.150.0070.0289.23
5.2.140.0050.0339.22
5.2.130.0050.0309.18
5.2.120.0030.0309.18
5.2.110.0040.0319.19
5.2.100.0100.0289.18
5.2.90.0030.0329.18
5.2.80.0060.0329.18
5.2.70.0060.0329.18
5.2.60.0070.0299.13
5.2.50.0050.0419.09
5.2.40.0050.0349.07
5.2.30.0060.0389.05
5.2.20.0090.0289.04
5.2.10.0040.0298.95
5.2.00.0040.0318.82
5.1.60.0080.0268.09
5.1.50.0050.0348.09
5.1.40.0080.0238.08
5.1.30.0060.0248.42
5.1.20.0050.0268.45
5.1.10.0050.0278.16
5.1.00.0050.0268.17
5.0.50.0040.0206.64
5.0.40.0030.0226.50
5.0.30.0050.0326.32
5.0.20.0060.0226.29
5.0.10.0040.0196.27
5.0.00.0020.0396.26
4.4.90.0020.0164.78
4.4.80.0020.0164.75
4.4.70.0040.0144.75
4.4.60.0050.0134.76
4.4.50.0040.0144.77
4.4.40.0020.0264.71
4.4.30.0030.0154.76
4.4.20.0030.0194.85
4.4.10.0040.0224.85
4.4.00.0030.0354.76
4.3.110.0040.0144.66
4.3.100.0030.0154.66
4.3.90.0010.0164.64
4.3.80.0040.0234.59
4.3.70.0040.0134.63
4.3.60.0050.0124.63
4.3.50.0020.0164.63
4.3.40.0040.0264.54
4.3.30.0010.0173.30
4.3.20.0020.0203.28
4.3.10.0020.0153.24
4.3.00.0030.02018.55

preferences:
57.93 ms | 401 KiB | 5 Q