3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); $b = 1000; $array = range(1000, 1); $i = $b; $s1 = microtime(true); while($i--) { $a = array_shift(array_slice($array, 0, 1)); } $s2 = microtime(true); echo $s2 - $s1; $s3 = microtime(true); $i = $b; while($i--) { $a = reset($array); } $s4 = microtime(true); echo "\n"; echo $s4 - $s3;

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.0080.00815.19
7.3.120.0090.00915.09
7.3.110.0040.01114.76
7.3.100.0100.01014.91
7.3.90.0000.01015.00
7.3.80.0090.00614.87
7.3.70.0070.00714.96
7.3.60.0070.01014.99
7.3.50.0070.01014.71
7.3.40.0070.00414.96
7.3.30.0030.00914.64
7.3.20.0000.01416.83
7.3.10.0060.00716.92
7.3.00.0110.00416.83
7.2.250.0040.01515.23
7.2.240.0070.01015.26
7.2.230.0040.01215.30
7.2.220.0030.01315.06
7.2.210.0030.00715.16
7.2.200.0080.00715.15
7.2.190.0060.00915.12
7.2.180.0050.00515.07
7.2.170.0070.00715.07
7.2.00.0040.01119.55
7.1.330.0090.00615.64
7.1.320.0090.00315.65
7.1.310.0030.00615.51
7.1.300.0100.00315.80
7.1.290.0000.00915.78
7.1.280.0090.00015.69
7.1.270.0110.00415.71
7.1.260.0090.00615.99
7.1.70.0000.00717.32
7.1.60.0090.01619.46
7.1.50.0070.01116.97
7.1.00.0000.07722.57
7.0.200.0000.00816.84
7.0.140.0100.06722.11
7.0.60.0130.07720.02
7.0.50.0030.06717.97
7.0.40.0070.09720.25
7.0.30.0270.07320.02
7.0.20.0230.04320.33
7.0.10.0100.08320.19
7.0.00.0030.06020.32
5.6.280.0070.06720.89
5.6.210.0100.07020.54
5.6.200.0070.06718.21
5.6.190.0030.05020.53
5.6.180.0170.08720.63
5.6.170.0130.05020.49
5.6.160.0030.04720.38
5.6.150.0100.07018.22
5.6.140.0100.06718.21
5.6.130.0100.04318.18
5.6.120.0030.08721.04
5.6.110.0030.04321.04
5.6.100.0200.06720.98
5.6.90.0170.03321.00
5.6.80.0130.08020.31
5.5.350.0230.06720.38
5.5.340.0100.05017.93
5.5.330.0170.06720.25
5.5.320.0130.04020.27
5.5.310.0330.05020.18
5.5.300.0030.04017.89
5.5.290.0100.07318.01
5.5.280.0170.07320.71
5.5.270.0070.04020.79
5.5.260.0100.07020.88
5.5.250.0030.04320.72
5.5.240.0000.07020.21
5.4.450.0400.07319.11
5.4.440.0330.06019.39
5.4.430.0300.07719.13
5.4.420.0300.04719.43
5.4.410.0400.06719.25
5.4.400.0530.06719.16
5.4.390.0230.04019.16
5.4.380.0370.06719.08
5.4.370.0430.06318.79
5.4.360.0300.05718.93
5.4.350.0370.06718.88
5.4.340.0300.07319.09
5.4.320.0200.03719.13
5.4.310.0200.04318.79
5.4.300.0130.04319.08
5.4.290.0230.04019.25
5.4.280.0170.04319.10
5.4.270.0200.04019.13
5.4.260.0200.05719.16
5.4.250.0200.03319.23
5.4.240.0200.04019.23
5.4.230.0200.04019.21
5.4.220.0170.04019.21
5.4.210.0170.04019.09
5.4.200.0200.03718.78
5.4.190.0170.04019.07
5.4.180.0130.04019.07
5.4.170.0170.04019.12
5.4.160.0170.04019.22
5.4.150.0230.04019.07
5.4.140.0230.06316.28
5.4.130.0270.05016.21
5.4.120.0300.07316.34
5.4.110.0430.06016.39
5.4.100.0470.04016.43
5.4.90.0300.06716.46
5.4.80.0230.07716.57
5.4.70.0270.04716.27
5.4.60.0270.07016.41
5.4.50.0270.03716.46
5.4.40.0300.06316.25
5.4.30.0370.06016.41
5.4.20.0270.04016.32
5.4.10.0330.07016.52
5.4.00.0270.05015.77
5.3.290.0130.04314.75
5.3.280.0230.04014.58
5.3.270.0170.04314.57
5.3.260.0200.03314.59
5.3.250.0230.04014.70
5.3.240.0300.06714.72
5.3.230.0300.05014.66
5.3.220.0270.08014.54
5.3.210.0470.06714.58
5.3.200.0300.04714.55
5.3.190.0270.06714.77
5.3.180.0400.06314.65
5.3.170.0470.04314.57
5.3.160.0230.04314.65
5.3.150.0230.04014.54
5.3.140.0300.05714.55
5.3.130.0370.05014.54
5.3.120.0470.05314.52
5.3.110.0270.06714.63
5.3.100.0370.06014.21
5.3.90.0300.05013.99
5.3.80.0330.05714.01
5.3.70.0270.07314.13
5.3.60.0400.06714.09
5.3.50.0300.07014.03
5.3.40.0300.04013.94
5.3.30.0270.07013.82
5.3.20.0230.05013.87
5.3.10.0300.06313.75
5.3.00.0400.04013.62
5.2.170.0270.02312.78
5.2.160.0230.03712.78
5.2.150.0170.04012.78
5.2.140.0230.03312.78
5.2.130.0200.06712.78
5.2.120.0230.05712.78
5.2.110.0300.05712.78
5.2.100.0300.05312.78
5.2.90.0370.05012.78
5.2.80.0300.04012.78
5.2.70.0270.05712.78
5.2.60.0230.04312.78
5.2.50.0230.03012.78
5.2.40.0230.05312.78
5.2.30.0200.06012.78
5.2.20.0270.04312.78
5.2.10.0230.03712.78
5.2.00.0230.03012.78
5.1.60.0370.03012.78
5.1.50.0370.02712.78
5.1.40.0200.03312.78
5.1.30.0100.03312.78
5.1.20.0330.04012.78
5.1.10.0170.06012.78
5.1.00.0230.05312.78
5.0.50.0100.04712.78
5.0.40.0100.02312.78
5.0.30.0030.07712.78
5.0.20.0130.03312.78
5.0.10.0070.03712.78
5.0.00.0100.06712.78
4.4.90.0070.03312.78
4.4.80.0170.03312.78
4.4.70.0070.02312.78
4.4.60.0130.02012.78
4.4.50.0100.03712.78
4.4.40.0100.05312.78
4.4.30.0130.03012.78
4.4.20.0100.03712.78
4.4.10.0130.03712.78
4.4.00.0100.04712.78
4.3.110.0130.03312.78
4.3.100.0100.03012.78
4.3.90.0130.02012.78
4.3.80.0100.05312.78
4.3.70.0100.02712.78
4.3.60.0130.03312.78
4.3.50.0070.04012.78
4.3.40.0130.04712.78
4.3.30.0030.04012.78
4.3.20.0070.02712.78
4.3.10.0070.03312.78
4.3.00.0030.02312.78

preferences:
44.58 ms | 400 KiB | 5 Q