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); } } $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.00.0100.01015.05
7.3.120.0070.01114.72
7.3.110.0040.01415.09
7.3.100.0000.01414.52
7.3.90.0030.00914.55
7.3.80.0040.01114.95
7.3.70.0040.01115.02
7.3.60.0060.00814.70
7.3.50.0040.01114.87
7.3.40.0100.00314.52
7.3.30.0030.01015.00
7.3.20.0030.00916.62
7.3.10.0090.00616.54
7.3.00.0030.01216.72
7.2.250.0000.02114.98
7.2.240.0030.01714.77
7.2.230.0100.00715.38
7.2.220.0030.01315.11
7.2.210.0030.01415.04
7.2.200.0030.01315.08
7.2.190.0070.00415.06
7.2.180.0030.00815.00
7.2.170.0090.00614.93
7.2.00.0070.01119.51
7.1.330.0100.00315.78
7.1.320.0030.01015.98
7.1.310.0060.00915.80
7.1.300.0040.01115.91
7.1.290.0060.00915.82
7.1.280.0070.00715.88
7.1.270.0060.00915.91
7.1.260.0080.00415.88
7.1.70.0050.00217.22
7.1.60.0140.01119.46
7.1.50.0000.02416.70
7.1.00.0030.07322.58
7.0.200.0030.00616.80
7.0.140.0030.07022.15
7.0.60.0070.07320.07
7.0.50.0070.04317.90
7.0.40.0070.05320.09
7.0.30.0400.07720.24
7.0.20.0270.08020.33
7.0.10.0070.08320.07
7.0.00.0000.06320.25
5.6.280.0000.07721.02
5.6.210.0070.07720.57
5.6.200.0030.04018.29
5.6.190.0100.06720.33
5.6.180.0230.08720.67
5.6.170.0200.07720.44
5.6.160.0100.08020.44
5.6.150.0100.07718.23
5.6.140.0070.06718.17
5.6.130.0100.07718.18
5.6.120.0200.07320.88
5.6.110.0030.09021.09
5.6.100.0100.06320.98
5.6.90.0170.07721.00
5.6.80.0100.07020.53
5.6.70.4370.04020.36
5.5.350.0230.07320.39
5.5.340.0100.03717.98
5.5.330.0030.04020.13
5.5.320.0130.03720.35
5.5.310.0270.04020.36
5.5.300.0030.08317.91
5.5.290.0030.07017.98
5.5.280.0100.07320.80
5.5.270.0070.06720.86
5.5.260.0100.04720.84
5.5.250.0000.04720.71
5.5.240.0370.06320.16
5.4.450.0170.04319.46
5.4.440.0230.04019.44
5.4.430.0570.04319.32
5.4.420.0200.04719.47
5.4.410.0470.04719.44
5.4.400.0370.04319.14
5.4.390.0330.04719.23
5.4.380.0500.07318.74
5.4.370.0700.06718.77
5.4.360.2330.08718.77
5.4.350.0530.06718.61
5.4.340.0370.06318.46
5.4.320.0060.04312.50
5.4.310.0040.04112.50
5.4.300.0050.03712.51
5.4.290.0040.04412.50
5.4.280.0040.04012.39
5.4.270.0060.03712.40
5.4.260.0090.03512.39
5.4.250.0060.03912.40
5.4.240.0060.04012.40
5.4.230.0080.03612.39
5.4.220.0050.03712.39
5.4.210.0040.03812.39
5.4.200.0070.03612.39
5.4.190.0070.03512.39
5.4.180.0030.03712.38
5.4.170.0030.03812.40
5.4.160.0070.03512.40
5.4.150.0060.03512.39
5.4.140.0080.03512.07
5.4.130.0060.03812.07
5.4.120.0040.03612.02
5.4.110.0060.03312.02
5.4.100.0040.03612.02
5.4.90.0080.03312.02
5.4.80.0060.03712.02
5.4.70.0060.03412.02
5.4.60.0070.03212.01
5.4.50.0070.03412.01
5.4.40.0040.03612.00
5.4.30.0100.03012.00
5.4.20.0040.03612.00
5.4.10.0060.03412.00
5.4.00.0080.03711.48
5.3.290.0060.03812.80
5.3.280.0050.03812.71
5.3.270.0060.03712.72
5.3.260.0050.03912.72
5.3.250.0060.03812.72
5.3.240.0070.03612.72
5.3.230.0020.04112.70
5.3.220.0100.03212.68
5.3.210.0040.04012.68
5.3.200.0070.03412.68
5.3.190.0040.03812.68
5.3.180.0050.03612.67
5.3.170.0080.03412.67
5.3.160.0020.04012.68
5.3.150.0060.04012.67
5.3.140.0030.03812.66
5.3.130.0030.04012.66
5.3.120.0090.03412.66
5.3.110.0030.04012.66
5.3.100.0060.03612.13
5.3.90.0070.04312.11
5.3.80.0070.03412.09
5.3.70.0050.03512.11
5.3.60.0040.03612.08
5.3.50.0060.03912.03
5.3.40.0080.03312.03
5.3.30.0050.03511.99
5.3.20.0020.03811.77
5.3.10.0050.04311.73
5.3.00.0040.03711.72
5.2.170.0060.0349.22
5.2.160.0050.0339.23
5.2.150.0030.0329.23
5.2.140.0040.0309.22
5.2.130.0020.0309.18
5.2.120.0070.0259.18
5.2.110.0020.0319.19
5.2.100.0050.0289.18
5.2.90.0030.0309.18
5.2.80.0040.0309.18
5.2.70.0050.0299.18
5.2.60.0040.0309.14
5.2.50.0060.0279.10
5.2.40.0040.0289.07
5.2.30.0020.0319.05
5.2.20.0050.0299.04
5.2.10.0030.0288.95
5.2.00.0030.0308.81
5.1.60.0040.0238.09
5.1.50.0070.0278.09
5.1.40.0030.0268.08
5.1.30.0050.0258.42
5.1.20.0050.0258.44
5.1.10.0030.0298.17
5.1.00.0050.0368.17
5.0.50.0030.0296.65
5.0.40.0020.0206.51
5.0.30.0040.0296.32
5.0.20.0050.0176.29
5.0.10.0030.0206.26
5.0.00.0050.0306.26
4.4.90.0010.0194.78
4.4.80.0010.0164.76
4.4.70.0020.0164.75
4.4.60.0020.0164.75
4.4.50.0050.0134.77
4.4.40.0030.0284.71
4.4.30.0030.0154.76
4.4.20.0030.0154.84
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0020.0154.67
4.3.100.0010.0164.66
4.3.90.0010.0164.63
4.3.80.0020.0244.59
4.3.70.0020.0144.63
4.3.60.0030.0144.63
4.3.50.0030.0144.63
4.3.40.0030.0234.54
4.3.30.0020.0153.30
4.3.20.0000.0173.28
4.3.10.0000.0173.24
4.3.00.0030.01718.55

preferences:
37.21 ms | 400 KiB | 5 Q