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) { var_dump($k .'='. $i); if ($i !== $k && $v !== null && $lower === mb_strtolower($v, 'utf-8')) { $item = null; } } }); var_dump($arr);

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.0080.00816.75
8.3.50.0090.00616.32
8.3.40.0150.00318.86
8.3.30.0070.00718.67
8.3.20.0040.00420.34
8.3.10.0080.00021.77
8.3.00.0000.00819.56
8.2.180.0040.01116.50
8.2.170.0090.00622.96
8.2.160.0070.00718.99
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00419.21
8.2.120.0080.00026.35
8.2.110.0060.00322.25
8.2.100.0080.00417.91
8.2.90.0040.00419.09
8.2.80.0090.00018.05
8.2.70.0030.00617.63
8.2.60.0000.00818.04
8.2.50.0000.00818.10
8.2.40.0000.00820.56
8.2.30.0040.00419.15
8.2.20.0050.00318.05
8.2.10.0000.00818.04
8.2.00.0000.00717.99
8.1.280.0150.00625.92
8.1.270.0060.00922.06
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.92
8.1.230.0080.00322.13
8.1.220.0000.00817.80
8.1.210.0050.00318.77
8.1.200.0060.00317.48
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0050.00318.67
8.1.160.0000.00819.01
8.1.150.0040.00418.84
8.1.140.0000.00819.54
8.1.130.0000.00718.95
8.1.120.0040.00417.41
8.1.110.0050.00317.50
8.1.100.0040.00417.44
8.1.90.0000.00717.46
8.1.80.0030.00317.38
8.1.70.0000.00717.55
8.1.60.0040.00417.63
8.1.50.0050.00317.61
8.1.40.0080.00017.45
8.1.30.0050.00317.60
8.1.20.0050.00317.71
8.1.10.0050.00217.45
8.1.00.0050.00317.57
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0030.00318.41
8.0.270.0030.00317.21
8.0.260.0030.00316.90
8.0.250.0000.00717.02
8.0.240.0070.00316.87
8.0.230.0000.00717.07
8.0.220.0050.00316.98
8.0.210.0040.00416.88
8.0.200.0080.00017.04
8.0.190.0040.00716.96
8.0.180.0070.00016.98
8.0.170.0040.00416.86
8.0.160.0030.00316.91
8.0.150.0000.00716.91
8.0.140.0040.00416.86
8.0.130.0080.00013.40
8.0.120.0040.00416.96
8.0.110.0000.00716.81
8.0.100.0000.00716.80
8.0.90.0000.00717.01
8.0.80.0060.01017.01
8.0.70.0000.00716.83
8.0.60.0020.00516.90
8.0.50.0040.00416.86
8.0.30.0140.00517.11
8.0.20.0110.00817.40
8.0.10.0040.00417.06
8.0.00.0110.00716.63
7.4.330.0030.00315.55
7.4.320.0070.00016.70
7.4.300.0000.00716.56
7.4.290.0000.00916.63
7.4.280.0070.00016.55
7.4.270.0040.00416.51
7.4.260.0000.01216.55
7.4.250.0030.00316.38
7.4.240.0000.00916.58
7.4.230.0040.00416.66
7.4.220.0060.01316.59
7.4.210.0120.00716.59
7.4.200.0000.00716.39
7.4.160.0050.01116.51
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0100.01016.43
7.4.120.0060.01416.56
7.4.110.0080.01416.49
7.4.100.0130.01016.63
7.4.90.0130.00316.49
7.4.80.0090.00919.39
7.4.70.0090.00816.51
7.4.60.0040.01416.32
7.4.50.0100.00716.45
7.4.40.0060.01216.40
7.4.30.0080.01116.48
7.4.00.0030.00914.80
7.3.330.0000.00613.41
7.3.320.0030.00313.25
7.3.310.0000.00716.50
7.3.300.0000.00716.27
7.3.290.0030.00616.29
7.3.280.0070.01016.39
7.3.270.0120.01217.40
7.3.260.0070.01216.44
7.3.250.0120.00816.46
7.3.240.0110.00816.46
7.3.230.0030.02116.41
7.3.210.0030.01616.66
7.3.200.0100.00716.64
7.3.190.0080.00816.22
7.3.180.0180.00016.60
7.3.170.0070.01016.55
7.3.160.0120.00316.41
7.2.330.0150.01116.82
7.2.320.0160.00816.71
7.2.310.0120.00916.86
7.2.300.0070.01716.53
7.2.290.0180.00016.78
7.2.60.0970.00515.21
7.2.00.0030.01019.23
7.1.200.0040.00415.81
7.1.100.0060.00318.32
7.1.70.0280.01015.59
7.1.60.0340.02533.38
7.1.50.0450.01333.15
7.1.40.0420.01732.91
7.1.30.0340.02332.93
7.1.20.0350.02532.80
7.1.10.0210.01515.08
7.1.00.0140.01014.93
7.0.200.0240.01014.98
7.0.190.0490.00614.91
7.0.180.0250.01014.32
7.0.170.0210.01514.30
7.0.160.0220.01114.18
7.0.150.0160.01314.57
7.0.140.0180.01414.61
7.0.130.0230.01314.42
7.0.120.0110.01514.70
7.0.110.0240.00914.42
7.0.100.0160.01014.48
7.0.90.1440.00014.64
7.0.80.0180.01414.72
7.0.70.0190.01114.57
7.0.60.0220.00314.46
7.0.50.0150.01114.37
7.0.40.0290.00814.63
7.0.30.0200.00814.63
7.0.20.0180.01214.86
7.0.10.0170.00814.76
7.0.00.0230.00914.89

preferences:
78.86 ms | 400 KiB | 5 Q