3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "0-1-1-3-1-1-3-5-0"; $array = explode('-', $input); $result = array_replace(array_fill(0, count($array), 0), array_unique($array)); var_export($result);

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.4.20.0090.01319.86
8.4.10.0040.00422.64
8.3.150.0070.01117.08
8.3.140.0140.00416.42
8.3.130.0080.00018.53
8.3.120.0060.00319.04
8.3.110.0150.00020.94
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0000.00916.50
8.3.70.0150.00416.75
8.3.60.0070.00718.31
8.3.50.0070.01124.46
8.3.40.0120.00918.68
8.3.30.0150.00018.39
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0080.00026.16
8.2.270.0030.00616.60
8.2.260.0100.01018.61
8.2.250.0070.00416.61
8.2.240.0000.00916.84
8.2.230.0110.00422.58
8.2.220.0060.00337.54
8.2.210.0070.00726.77
8.2.200.0000.01016.63
8.2.190.0140.00316.58
8.2.180.0080.00825.92
8.2.170.0090.00618.59
8.2.160.0070.00722.96
8.2.150.0000.00825.66
8.2.140.0060.00324.66
8.2.130.0030.00526.16
8.2.120.0040.00419.64
8.2.110.0090.01219.33
8.2.100.0120.00019.54
8.2.90.0040.00417.63
8.2.80.0060.00319.11
8.2.70.0040.00417.88
8.2.60.0060.00318.05
8.2.50.0000.00918.10
8.2.40.0030.00520.89
8.2.30.0070.00019.25
8.2.20.0040.00417.92
8.2.10.0070.00019.37
8.2.00.0050.00319.23
8.1.310.0050.00318.37
8.1.300.0100.00717.62
8.1.290.0030.00618.88
8.1.280.0120.00625.92
8.1.270.0030.00623.86
8.1.260.0090.00926.35
8.1.250.0000.00828.09
8.1.240.0090.00019.28
8.1.230.0070.00320.89
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0040.00417.23
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0100.00318.41
8.1.160.0090.00018.92
8.1.150.0050.00218.88
8.1.140.0070.00020.26
8.1.130.0050.00320.13
8.1.120.0000.00817.35
8.1.110.0040.00417.33
8.1.100.0050.00317.37
8.1.90.0040.00317.42
8.1.80.0070.00317.48
8.1.70.0040.00417.44
8.1.60.0030.00617.52
8.1.50.0040.00417.48
8.1.40.0040.00417.52
8.1.30.0080.00017.54
8.1.20.0000.00817.68
8.1.10.0040.00417.39
8.1.00.0080.00017.39
8.0.300.0040.00420.18
8.0.290.0060.00616.63
8.0.280.0040.00418.43
8.0.270.0060.00316.66
8.0.260.0000.00620.13
8.0.250.0030.00316.88
8.0.240.0000.00716.89
8.0.230.0030.00316.90
8.0.220.0040.00416.74
8.0.210.0000.00616.81
8.0.200.0000.00716.90
8.0.190.0040.00416.86
8.0.180.0040.00416.82
8.0.170.0000.00916.86
8.0.160.0000.00717.00
8.0.150.0040.00416.84
8.0.140.0040.00716.87
8.0.130.0030.00313.36
8.0.120.0070.00016.81
8.0.110.0000.00716.89
8.0.100.0040.00416.95
8.0.90.0000.00716.71
8.0.80.0060.00916.81
8.0.70.0050.00216.95
8.0.60.0030.00417.00
8.0.50.0000.00816.68
8.0.30.0070.01017.02
8.0.20.0150.00317.01
8.0.10.0030.00516.90
8.0.00.0110.00816.87
7.4.330.0030.00315.55
7.4.320.0030.00316.60
7.4.300.0030.00316.45
7.4.290.0070.00016.65
7.4.280.0030.00516.46
7.4.270.0030.00316.39
7.4.260.0000.00513.27
7.4.250.0070.00016.56
7.4.240.0040.00416.66
7.4.230.0030.00316.64
7.4.220.0030.00316.36
7.4.210.0060.00916.53
7.4.200.0000.00716.59
7.4.130.0090.00916.47
7.4.120.0090.01516.46
7.4.110.0040.01216.43
7.4.100.0040.01516.45
7.4.90.0150.00316.41
7.4.80.0120.00616.40
7.4.70.0100.00716.47
7.4.60.0070.01016.44
7.4.50.0070.01116.59
7.4.40.0000.01816.25
7.4.30.0130.00315.84
7.4.20.0170.00316.27
7.4.10.0130.01016.42
7.4.00.0050.01116.23
7.3.330.0030.00316.27
7.3.320.0060.00013.10
7.3.310.0000.00716.25
7.3.300.0030.00316.16
7.3.290.0090.00616.18
7.3.280.0120.00916.05
7.3.260.0100.01316.12
7.3.230.0040.01316.29
7.3.210.0100.00616.34
7.3.200.0030.01916.26
7.3.190.0070.01016.08
7.3.180.0060.01016.26
7.3.170.0080.01416.42
7.3.160.0070.01316.08
7.3.150.0100.01016.08
7.3.140.0060.01216.17
7.3.130.0150.00316.19
7.3.120.0090.01215.88
7.3.110.0160.00616.18
7.3.100.0100.00716.19
7.3.90.0100.00716.10
7.3.80.0130.00416.23
7.3.70.0060.01016.12
7.3.60.0100.00715.95
7.3.50.0090.00916.19
7.3.40.0100.00716.13
7.3.30.0100.00715.96
7.3.20.0120.00515.97
7.3.10.0100.00716.07
7.3.00.0120.01216.05
7.2.330.0070.01116.48
7.2.320.0140.00916.43
7.2.310.0090.00916.19
7.2.300.0070.01116.62
7.2.290.0100.01416.57
7.2.280.0090.01216.51
7.2.270.0110.01116.27
7.2.260.0030.01516.30
7.2.250.0130.01016.31
7.2.240.0030.01816.36
7.2.230.0100.01016.43
7.2.220.0180.00316.38
7.2.210.0120.00616.31
7.2.200.0150.00416.28
7.2.190.0170.00516.29
7.2.180.0030.01616.41
7.2.170.0070.01116.34
7.2.160.0100.01016.30
7.2.150.0420.01116.15
7.2.140.0030.01416.58
7.2.130.0100.01016.41
7.2.120.0110.01116.24
7.2.110.0110.01116.40
7.2.100.0140.00716.32
7.2.90.0090.01216.38
7.2.80.0160.00416.41
7.2.70.0040.01416.43
7.2.60.0040.01516.41
7.2.50.0100.01016.25
7.2.40.0120.01316.44
7.2.30.0170.00716.40
7.2.20.0100.01316.09
7.2.10.0090.00916.37
7.2.00.0100.01316.22

preferences:
30.73 ms | 403 KiB | 5 Q