3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'foo', 'foo', 'bar', 'baz', 'baz' ]; array_walk($arr, function (&$item, $k) use ($arr) { $lower = mb_strtolower($item, 'utf-8'); foreach ($arr as $i => $v) { if ($i !== $k && $lower === mb_strtolower($v, 'utf-8')) { $item = null; } } });

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.60.0100.00718.30
8.3.50.0120.00316.64
8.3.40.0100.01018.64
8.3.30.0000.01418.71
8.3.20.0040.00420.38
8.3.10.0040.00421.62
8.3.00.0060.00319.56
8.2.180.0070.00716.75
8.2.170.0120.00322.96
8.2.160.0070.01019.08
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0050.00319.39
8.2.120.0070.00026.35
8.2.110.0060.00322.10
8.2.100.0040.00817.84
8.2.90.0080.00019.21
8.2.80.0050.00317.97
8.2.70.0060.00617.50
8.2.60.0050.00318.04
8.2.50.0000.00818.10
8.2.40.0040.00420.44
8.2.30.0070.00019.22
8.2.20.0000.00717.94
8.2.10.0040.00418.12
8.2.00.0050.00218.07
8.1.280.0040.01125.92
8.1.270.0040.00422.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0140.00423.84
8.1.230.0070.00322.12
8.1.220.0040.00417.76
8.1.210.0050.00518.77
8.1.200.0030.00617.36
8.1.190.0080.00017.23
8.1.180.0060.00318.10
8.1.170.0040.00420.44
8.1.160.0030.00619.06
8.1.150.0020.00518.95
8.1.140.0000.00719.59
8.1.130.0000.00718.87
8.1.120.0030.00517.49
8.1.110.0040.00417.51
8.1.100.0020.00517.52
8.1.90.0030.00517.56
8.1.80.0040.00417.54
8.1.70.0030.00317.50
8.1.60.0000.00917.54
8.1.50.0040.00417.62
8.1.40.0110.00017.57
8.1.30.0000.00717.73
8.1.20.0040.00417.55
8.1.10.0000.00817.51
8.1.00.0070.00017.48
8.0.300.0090.00018.77
8.0.290.0000.00716.75
8.0.280.0070.00018.51
8.0.270.0000.00717.28
8.0.260.0000.00716.89
8.0.250.0000.00717.02
8.0.240.0040.00416.91
8.0.230.0030.00316.91
8.0.220.0030.00516.84
8.0.210.0000.00817.00
8.0.200.0040.00417.06
8.0.190.0080.00216.92
8.0.180.0000.00717.01
8.0.170.0030.00516.89
8.0.160.0000.00717.00
8.0.150.0040.00416.86
8.0.140.0000.00816.93
8.0.130.0030.00313.47
8.0.120.0000.00816.84
8.0.110.0070.00016.92
8.0.100.0070.00017.02
8.0.90.0040.00416.86
8.0.80.0160.00316.89
8.0.70.0050.00216.89
8.0.60.0030.00516.75
8.0.50.0040.00416.89
8.0.30.0110.00617.06
8.0.20.0120.00717.40
8.0.10.0040.00416.98
8.0.00.0060.01216.70
7.4.330.0030.00315.55
7.4.320.0000.00616.69
7.4.300.0000.00716.64
7.4.290.0070.00016.65
7.4.280.0000.00816.57
7.4.270.0000.00716.57
7.4.260.0000.00716.46
7.4.250.0000.00716.61
7.4.240.0040.00416.59
7.4.230.0030.00316.76
7.4.220.0100.01316.70
7.4.210.0080.00816.69
7.4.200.0030.00316.74
7.4.160.0110.00516.58
7.4.150.0160.00917.40
7.4.140.0080.00917.86
7.4.130.0090.01016.61
7.4.120.0150.00316.49
7.4.110.0100.00716.33
7.4.100.0060.01216.57
7.4.90.0080.00816.43
7.4.80.0100.00719.39
7.4.70.0120.00316.64
7.4.60.0070.01016.41
7.4.50.0150.00416.66
7.4.40.0000.01716.41
7.4.30.0090.00616.68
7.4.00.0030.00914.87
7.3.330.0020.00213.20
7.3.320.0000.00613.35
7.3.310.0070.00016.32
7.3.300.0000.00716.44
7.3.290.0060.00316.43
7.3.280.0080.00916.45
7.3.270.0090.00917.40
7.3.260.0140.00716.55
7.3.250.0120.00616.43
7.3.240.0080.01216.53
7.3.230.0060.01216.63
7.3.210.0030.01216.32
7.3.200.0110.00516.45
7.3.190.0100.00616.54
7.3.180.0130.00716.22
7.3.170.0100.00716.64
7.3.160.0090.00616.37
7.3.10.0060.00616.45
7.3.00.0090.00316.57
7.2.330.0090.00916.53
7.2.320.0110.00716.71
7.2.310.0100.00616.55
7.2.300.0180.00016.73
7.2.290.0110.00516.78
7.2.130.0050.00817.00
7.2.120.0100.00617.13
7.2.110.0100.01017.14
7.2.100.0020.01116.98
7.2.90.0100.00716.91
7.2.80.0120.01217.02
7.2.70.0120.00916.75
7.2.60.0030.01416.81
7.2.50.0100.00516.85
7.2.40.0040.01317.11
7.2.30.0070.00717.01
7.2.20.0150.00416.93
7.2.10.0080.00817.01
7.2.00.0080.00918.30
7.1.250.0040.01115.73
7.1.200.0060.00915.71
7.1.100.1260.00611.45
7.1.70.0170.00715.56
7.1.60.0410.01233.56
7.1.50.0380.01032.78
7.1.40.0560.00732.76
7.1.30.0390.01832.66
7.1.20.0350.01832.80
7.1.10.0250.00914.81
7.1.00.0180.01314.96
7.0.200.0200.00915.06
7.0.190.0260.00914.95
7.0.180.0220.01014.18
7.0.170.0170.01714.29
7.0.160.0180.01114.41
7.0.150.0190.01014.59
7.0.140.0110.01814.41
7.0.130.0270.00714.43
7.0.120.1070.01014.88
7.0.110.0120.01414.58
7.0.100.0230.01614.51
7.0.90.0250.01014.22
7.0.80.0200.02014.49
7.0.70.0240.01214.48
7.0.60.0240.00914.45
7.0.50.0260.01014.52
7.0.40.0230.01114.95
7.0.30.0280.00614.50
7.0.20.0190.00914.87
7.0.10.0250.00614.62
7.0.00.0230.00714.81

preferences:
31.37 ms | 400 KiB | 5 Q