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 $a1 = $s2 - $s1; $s3 = microtime(true); $i = $b; while($i--) { $a = reset($array); } $s4 = microtime(true); echo "\n"; echo $a2 = $s4 - $s3; echo "\n"; echo $a2/$a1;

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.00915.01
7.3.120.0080.00814.92
7.3.110.0080.01114.83
7.3.100.0020.01514.75
7.3.90.0070.01014.76
7.3.80.0090.00714.90
7.3.70.0060.00714.71
7.3.60.0050.01014.85
7.3.50.0020.01414.93
7.3.40.0090.00614.74
7.3.30.0080.00614.98
7.3.20.0050.01016.72
7.3.10.0040.01116.71
7.3.00.0080.00616.56
7.2.250.0070.01214.91
7.2.240.0090.00915.25
7.2.230.0080.01014.95
7.2.220.0070.01115.00
7.2.210.0060.01114.95
7.2.200.0070.00915.15
7.2.190.0090.00714.98
7.2.180.0080.00715.00
7.2.170.0070.00915.16
7.2.00.0000.01419.17
7.1.330.0030.01415.75
7.1.320.0020.01515.86
7.1.310.0030.01215.83
7.1.300.0090.00515.85
7.1.290.0020.01315.74
7.1.280.0080.00915.89
7.1.270.0060.00915.74
7.1.260.0060.00915.48
7.1.70.0000.01417.11
7.1.60.0070.01819.46
7.1.50.0100.01416.57
7.1.00.0070.07722.28
7.0.200.0100.00016.61
7.0.140.0030.06722.09
7.0.60.0130.06719.88
7.0.50.0130.05317.82
7.0.40.0100.08320.12
7.0.30.0300.07320.05
7.0.20.0330.07320.09
7.0.10.0130.07020.00
7.0.00.0100.04720.11
5.6.280.0100.07021.05
5.6.210.0000.04320.80
5.6.200.0270.07318.08
5.6.190.0130.04020.45
5.6.180.0200.07320.41
5.6.170.0270.06320.50
5.6.160.0030.08320.70
5.6.150.0070.03718.08
5.6.140.0000.09318.16
5.6.130.0070.08018.16
5.6.120.0030.05721.15
5.6.110.0170.06321.02
5.6.100.0070.04021.00
5.6.90.0070.08321.21
5.6.80.0130.07320.41
5.5.350.0400.06720.43
5.5.340.0100.04317.89
5.5.330.0070.08720.47
5.5.320.0230.05020.30
5.5.310.0200.08020.16
5.5.300.0000.04317.92
5.5.290.0100.05017.92
5.5.280.0070.05320.88
5.5.270.0030.05020.87
5.5.260.0030.08320.79
5.5.250.0070.08320.82
5.5.240.0200.07320.10
5.4.450.0270.05719.58
5.4.440.0070.06319.54
5.4.430.0200.04719.60
5.4.420.0100.05719.44
5.4.410.0230.04319.61
5.4.400.0070.06319.20
5.4.390.0170.05319.18
5.4.380.0230.04718.65
5.4.370.0130.07318.69
5.4.360.0230.04018.80
5.4.350.0070.06018.60
5.4.340.0200.04718.79
5.4.320.0060.03712.60
5.4.310.0030.04312.59
5.4.300.0040.04112.59
5.4.290.0060.05012.58
5.4.280.0140.05912.47
5.4.270.0100.05412.48
5.4.260.0260.09712.47
5.4.250.0120.07012.47
5.4.240.0110.05312.47
5.4.230.0200.07112.47
5.4.220.0130.05312.46
5.4.210.0120.07912.47
5.4.200.0110.10312.46
5.4.190.0190.10812.46
5.4.180.0200.09712.46
5.4.170.0160.08812.48
5.4.160.0180.08412.47
5.4.150.0140.06512.46
5.4.140.0100.06412.15
5.4.130.0140.07412.14
5.4.120.0080.08212.10
5.4.110.0100.08312.09
5.4.100.0090.06212.09
5.4.90.0050.06112.09
5.4.80.0170.07212.09
5.4.70.0120.10112.09
5.4.60.0140.10712.09
5.4.50.0220.11212.09
5.4.40.0170.10412.08
5.4.30.0150.08112.08
5.4.20.0260.12812.07
5.4.10.0260.11412.08
5.4.00.0350.13411.57
5.3.290.0050.04412.85
5.3.280.0150.12712.78
5.3.270.0340.10412.79
5.3.260.0210.08712.79
5.3.250.0180.10712.79
5.3.240.0140.08112.79
5.3.230.0080.06012.78
5.3.220.0110.06912.75
5.3.210.0110.07712.75
5.3.200.0070.07112.75
5.3.190.0070.06012.75
5.3.180.0210.08612.74
5.3.170.0100.06112.75
5.3.160.0140.08412.75
5.3.150.0120.08312.75
5.3.140.0170.09812.73
5.3.130.0150.04712.73
5.3.120.0090.05912.73
5.3.110.0200.08912.73
5.3.100.0160.11012.21
5.3.90.0110.05512.20
5.3.80.0090.04412.19
5.3.70.0080.04512.20
5.3.60.0170.06412.18
5.3.50.0180.05112.13
5.3.40.0110.07112.13
5.3.30.0080.04312.09
5.3.20.0090.05211.87
5.3.10.0130.06811.83
5.3.00.0200.10711.82
5.2.170.0120.0959.32
5.2.160.0090.0369.32
5.2.150.0080.0559.32
5.2.140.0080.0479.31
5.2.130.0100.0399.27
5.2.120.0120.0409.27
5.2.110.0130.0599.28
5.2.100.0050.0579.27
5.2.90.0100.0359.27
5.2.80.0070.0379.27
5.2.70.0060.0519.27
5.2.60.0060.0539.22
5.2.50.0150.0659.19
5.2.40.0150.0639.16
5.2.30.0140.0679.15
5.2.20.0060.0829.13
5.2.10.0040.0459.08
5.2.00.0080.0458.95
5.1.60.0100.0358.27
5.1.50.0040.0318.27
5.1.40.0050.0318.25
5.1.30.0070.0308.60
5.1.20.0060.0768.63
5.1.10.0100.0518.34
5.1.00.0090.0428.35
5.0.50.0080.0416.81
5.0.40.0040.0306.68
5.0.30.0130.0876.50
5.0.20.0090.0266.47
5.0.10.0040.0326.45
5.0.00.0070.0426.44
4.4.90.0010.0284.84
4.4.80.0040.0244.82
4.4.70.0030.0264.82
4.4.60.0040.0264.83
4.4.50.0070.0234.84
4.4.40.0040.0304.83
4.4.30.0040.0244.83
4.4.20.0070.0334.89
4.4.10.0040.0204.89
4.4.00.0040.0294.86
4.3.110.0020.0214.77
4.3.100.0040.0184.75
4.3.90.0040.0214.75
4.3.80.0010.0384.75
4.3.70.0060.0224.74
4.3.60.0040.0244.75
4.3.50.0020.0214.75
4.3.40.0010.0384.70
4.3.30.0030.0203.50
4.3.20.0010.0263.49
4.3.10.0000.0253.44
4.3.00.0070.0208.73

preferences:
41 ms | 400 KiB | 5 Q