3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = explode(',', 'Katha,pooja,singer,katha'); $result = []; foreach ($array as $value) { $result[strtolower($value)] ??= $value; } var_export(array_values($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.120.0110.00920.39
8.4.110.0040.00622.45
8.4.100.0130.00817.46
8.4.90.0120.00718.39
8.4.80.0100.00817.57
8.4.70.0070.00817.63
8.4.60.0140.00818.85
8.4.50.0130.01019.50
8.4.40.0000.01520.49
8.4.30.0080.00823.91
8.4.20.0060.00919.53
8.4.10.0200.00021.89
8.3.250.0090.00918.90
8.3.240.0140.00616.64
8.3.230.0120.00716.48
8.3.220.0110.00617.39
8.3.210.0050.00316.80
8.3.200.0060.00316.53
8.3.190.0100.00517.01
8.3.180.0090.01116.79
8.3.170.0090.00917.13
8.3.160.0060.00318.30
8.3.150.0060.01218.72
8.3.140.0030.00520.55
8.3.130.0130.00318.44
8.3.120.0040.01120.68
8.3.110.0090.00320.94
8.3.100.0040.00724.06
8.3.90.0040.01526.77
8.3.80.0060.00318.30
8.3.70.0120.00416.37
8.3.60.0070.01416.75
8.3.50.0090.00616.64
8.3.40.0070.00720.29
8.3.30.0040.01118.54
8.3.20.0000.00924.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0110.00820.32
8.2.280.0110.00718.30
8.2.270.0060.01217.39
8.2.260.0150.00416.94
8.2.250.0110.00416.46
8.2.240.0160.00319.05
8.2.230.0060.00322.58
8.2.220.0130.00337.54
8.2.210.0040.00426.77
8.2.200.0060.00316.75
8.2.190.0100.00318.29
8.2.180.0040.01116.63
8.2.170.0150.00418.90
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00419.78
8.2.110.0030.00619.21
8.2.100.0080.00318.03
8.2.90.0000.00817.75
8.2.80.0000.00818.81
8.2.70.0000.00817.75
8.2.60.0100.00517.50
8.2.50.0130.00517.59
8.2.40.0170.00017.13
8.2.30.0160.00017.62
8.2.20.0040.00417.75
8.2.10.0190.00017.25
8.2.00.0130.00317.38
8.1.330.0100.00821.64
8.1.320.0100.00916.21
8.1.310.0080.00016.71
8.1.300.0130.00617.87
8.1.290.0060.00630.84
8.1.280.0070.00725.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00023.92
8.1.230.0070.00420.97
8.1.220.0030.00518.55
8.1.210.0050.00318.77
8.1.200.0040.00417.35
8.1.190.0060.01217.00
8.1.180.0140.00517.00
8.1.170.0080.00817.13
8.1.160.0140.00317.13
8.1.150.0130.01017.00
8.1.140.0080.00816.97
8.1.130.0080.00817.34
8.1.120.0200.00017.23
8.1.110.0140.00517.22
8.1.100.0110.00717.25
8.1.90.0110.00517.25
8.1.80.0100.00717.25
8.1.70.0120.00617.50
8.1.60.0120.00617.59
8.1.50.0150.00317.25
8.1.40.0120.00517.38
8.1.30.0140.00317.59
8.1.20.0060.01217.38
8.1.10.0120.00617.38
8.1.00.0130.00616.99
8.0.300.0040.00419.89
8.0.290.0030.00516.63
8.0.280.0160.00016.52
8.0.270.0180.00016.52
8.0.260.0120.00416.52
8.0.250.0110.00516.63
8.0.240.0100.00716.63
8.0.230.0110.00616.52
8.0.220.0070.01116.52
8.0.210.0110.00516.72
8.0.200.0000.01716.52
8.0.190.0060.00916.61
8.0.180.0120.00616.63
8.0.170.0110.00616.63
8.0.160.0110.00616.88
8.0.150.0080.00816.52
8.0.140.0160.00016.52
8.0.130.0120.00316.52
8.0.120.0170.00016.52
8.0.110.0130.00316.60
8.0.100.0120.00416.60
8.0.90.0130.00316.52
8.0.80.0170.00016.61
8.0.70.0120.00616.52
8.0.60.0140.00216.52
8.0.50.0110.00516.52
8.0.30.0130.00316.52
8.0.20.0130.00316.59
8.0.10.0120.00316.63

preferences:
28.38 ms | 403 KiB | 5 Q