3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, 55, 38, 38, 23, 22, 110, 1, 1, 2, 56, 15, 15, 78, 34); $curVal = null; foreach($array as $item) { if($item != $curVal) echo $item; echo '<br />'; $curVal = $item; }

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)
8.3.70.0120.00616.73
8.3.60.0120.00318.56
8.3.50.0090.00721.91
8.3.40.0070.00718.73
8.3.30.0110.00418.75
8.3.20.0070.00020.16
8.3.10.0070.00021.72
8.3.00.0000.00720.75
8.2.180.0160.00616.50
8.2.170.0030.01222.96
8.2.160.0070.00722.05
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0080.00017.50
8.2.110.0190.00320.92
8.2.100.0040.00717.69
8.2.90.0080.00019.25
8.2.80.0060.00317.97
8.2.70.0050.00317.50
8.2.60.0040.00418.04
8.2.50.0050.00318.07
8.2.40.0000.00818.16
8.2.30.0000.00718.11
8.2.20.0020.00517.71
8.2.10.0040.00417.85
8.2.00.0050.00217.70
8.1.280.0060.01225.92
8.1.270.0060.00324.01
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00321.24
8.1.230.0040.00817.42
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0050.00517.47
8.1.190.0040.00817.10
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0040.00421.92
8.1.150.0050.00318.68
8.1.140.0040.00417.36
8.1.130.0030.00317.73
8.1.120.0000.00717.44
8.1.110.0020.00517.33
8.1.100.0050.00217.49
8.1.90.0070.00017.49
8.1.80.0030.00317.50
8.1.70.0030.00317.46
8.1.60.0030.00817.56
8.1.50.0000.00917.41
8.1.40.0050.00217.50
8.1.30.0000.00817.63
8.1.20.0040.00417.54
8.1.10.0000.00817.50
8.1.00.0080.00017.43
8.0.300.0000.01018.77
8.0.290.0060.00316.63
8.0.280.0030.00318.45
8.0.270.0040.00417.30
8.0.260.0030.00316.76
8.0.250.0000.00716.93
8.0.240.0030.00316.83
8.0.230.0000.00816.85
8.0.220.0070.00016.91
8.0.210.0030.00316.75
8.0.200.0030.00316.95
8.0.190.0000.00816.89
8.0.180.0000.00716.91
8.0.170.0030.00616.87
8.0.160.0060.00316.84
8.0.150.0000.00716.80
8.0.140.0000.00816.86
8.0.130.0030.00313.29
8.0.120.0040.00416.90
8.0.110.0040.00416.72
8.0.100.0040.00416.75
8.0.90.0080.00016.91
8.0.80.0120.00316.84
8.0.70.0000.00816.96
8.0.60.0040.00416.77
8.0.50.0040.00416.91
8.0.30.0110.01117.12
8.0.20.0100.01017.40
8.0.10.0000.00716.94
8.0.00.0150.00416.72
7.4.330.0020.00215.03
7.4.320.0030.00316.49
7.4.300.0030.00316.49
7.4.290.0070.00016.35
7.4.280.0030.00616.40
7.4.270.0000.00716.40
7.4.260.0070.00016.34
7.4.250.0040.00416.41
7.4.240.0030.00316.51
7.4.230.0070.00016.29
7.4.220.0110.00616.40
7.4.210.0050.01216.53
7.4.200.0000.00716.61
7.4.190.0000.00716.46
7.4.160.0090.00616.39
7.4.150.0130.00417.40
7.4.140.0170.00317.86
7.4.130.0100.01116.47
7.4.120.0090.00716.42
7.4.110.0140.00716.61
7.4.100.0060.01916.30
7.4.90.0060.01116.52
7.4.80.0120.00916.66
7.4.70.0190.00416.63
7.4.60.0090.00816.45
7.4.50.0020.00216.30
7.4.40.0070.01022.77
7.4.30.0150.00516.53
7.4.00.0030.01014.88
7.3.330.0050.00013.23
7.3.320.0050.00013.03
7.3.310.0050.00216.26
7.3.300.0000.00716.30
7.3.290.0100.01016.32
7.3.280.0080.00816.29
7.3.270.0060.01017.40
7.3.260.0080.00816.33
7.3.250.0140.00716.33
7.3.240.0190.00316.55
7.3.230.0110.01216.48
7.3.210.0130.00316.39
7.3.200.0100.01319.39
7.3.190.0080.00816.64
7.3.180.0090.00616.39
7.3.170.0110.00516.41
7.3.160.0120.00316.38
7.3.120.0040.00814.73
7.2.330.0090.00916.66
7.2.320.0110.00616.43
7.2.310.0090.01016.39
7.2.300.0070.01016.43
7.2.290.0100.00616.67
7.2.00.0030.00619.56
7.1.100.0040.00817.75
7.1.70.0030.00717.23
7.1.60.0100.01019.32
7.1.50.0100.00317.11
7.1.00.0030.07722.58
7.0.200.0040.00416.94
7.0.140.0030.07322.21
7.0.60.0070.04719.91
7.0.50.0070.04017.86
7.0.40.0170.07720.12
7.0.30.0130.04720.18
7.0.20.0270.07320.03
7.0.10.0200.06720.30
7.0.00.0070.04320.13
5.6.280.0130.06021.07
5.6.210.0070.08020.45
5.6.200.0070.08018.18
5.6.190.0100.04020.58
5.6.180.0300.06020.24
5.6.170.0270.06020.48
5.6.160.0070.08320.68
5.6.150.0000.04318.21
5.6.140.0100.07318.11
5.6.130.0170.08018.21
5.6.120.0170.06721.12
5.6.110.0070.08321.01
5.6.100.0000.09021.04
5.6.90.0000.08320.98
5.6.80.0030.08020.52
5.6.70.0370.06320.34
5.5.350.0200.08020.46
5.5.340.0030.04317.96
5.5.330.0070.05720.12
5.5.320.0330.06720.15
5.5.310.0330.03020.51
5.5.300.0100.06017.89
5.5.290.0070.08017.89
5.5.280.0070.05320.65
5.5.270.0130.08320.76
5.5.260.0070.07720.89
5.5.250.0030.05320.61
5.5.240.0100.07720.26
5.4.450.0200.07719.26
5.4.440.0230.07019.41
5.4.430.0130.07319.45
5.4.420.0230.07019.13
5.4.410.0130.07719.29
5.4.400.0200.07019.25
5.4.390.0170.07719.10
5.4.380.0200.07018.93
5.4.370.0170.07719.25
5.4.360.0200.07319.05
5.4.350.0300.06318.88
5.4.340.0170.06318.88
5.4.320.0200.07019.16
5.4.310.0330.05319.16
5.4.300.0300.06718.80
5.4.290.0200.07319.04
5.4.280.0200.04319.12
5.4.270.0170.08018.88
5.4.260.0200.07319.21
5.4.250.0200.06718.91
5.4.240.0300.05018.94
5.4.230.0270.04318.80
5.4.220.0200.06318.89
5.4.210.0230.05719.05
5.4.200.0100.08319.13
5.4.190.0200.07718.90
5.4.180.0170.07018.91
5.4.170.0130.08319.09
5.4.160.0200.07719.23
5.4.150.0200.05319.22
5.4.140.0300.03716.29
5.4.130.0170.06716.30
5.4.120.0200.03716.46
5.4.110.0170.05016.19
5.4.100.0200.07016.46
5.4.90.0170.05016.34
5.4.80.0070.07316.37
5.4.70.0300.06016.39
5.4.60.0200.07016.38
5.4.50.0170.05316.28
5.4.40.0170.05716.38
5.4.30.0230.07016.36
5.4.20.0200.05716.46
5.4.10.0130.07316.36
5.4.00.0130.06715.73
5.3.290.0170.07714.71
5.3.280.0230.06714.52
5.3.270.0170.04014.45
5.3.260.0270.04714.54
5.3.250.0130.05014.46
5.3.240.0230.05014.50
5.3.230.0200.06314.47
5.3.220.0170.08014.44
5.3.210.0170.04014.51
5.3.200.0200.03314.61
5.3.190.0200.06714.47
5.3.180.0170.04314.61
5.3.170.0170.07314.47
5.3.160.0230.07314.39
5.3.150.0170.08014.54
5.3.140.0230.04714.46
5.3.130.0170.07314.64
5.3.120.0230.05714.38
5.3.110.0130.06714.40
5.3.100.0130.07713.90
5.3.90.0230.04313.89
5.3.80.0170.07013.96
5.3.70.0130.05013.86
5.3.60.0200.03314.05
5.3.50.0170.04313.93
5.3.40.0130.03713.85
5.3.30.0130.04013.71
5.3.20.0270.02313.78
5.3.10.0130.03713.70
5.3.00.0170.03313.73
5.2.170.0200.04012.16
5.2.160.0100.03012.16
5.2.150.0100.06312.16
5.2.140.0170.05312.16
5.2.130.0130.03012.16
5.2.120.0170.02712.16
5.2.110.0170.03012.16
5.2.100.0070.03012.16
5.2.90.0070.05012.16
5.2.80.0130.02712.16
5.2.70.0100.03012.16
5.2.60.0130.02712.16
5.2.50.0070.03012.16
5.2.40.0100.02712.16
5.2.30.0070.03312.16
5.2.20.0070.02712.16
5.2.10.0100.02712.16
5.2.00.0070.02712.16
5.1.60.0130.02012.16
5.1.50.0070.02712.16
5.1.40.0030.02712.16
5.1.30.0100.03012.16
5.1.20.0130.02712.16
5.1.10.0030.02712.16
5.1.00.0030.03012.16
5.0.50.0030.02012.16
5.0.40.0030.02012.16
5.0.30.0030.03312.16
5.0.20.0100.02012.16
5.0.10.0100.03312.16
5.0.00.0030.03012.16
4.4.90.0030.01712.16
4.4.80.0070.02312.16
4.4.70.0070.01712.16
4.4.60.0030.02012.16
4.4.50.0030.01712.16
4.4.40.0070.03012.16
4.4.30.0070.01312.16
4.4.20.0000.02012.16
4.4.10.0070.01312.16
4.4.00.0070.02712.16
4.3.110.0000.01712.16
4.3.100.0030.01712.16
4.3.90.0070.01312.16
4.3.80.0030.02312.16
4.3.70.0030.01712.16
4.3.60.0130.01312.16
4.3.50.0070.01312.16
4.3.40.0000.02312.16
4.3.30.0000.01712.16
4.3.20.0000.01712.16
4.3.10.0030.02712.16
4.3.00.0030.01312.16

preferences:
43.92 ms | 401 KiB | 5 Q