3v4l.org

run code in 300+ PHP versions simultaneously
<?php $features = [ "width: 100 m", "method: Nail Down", "method: Main Floor", "Warranty: 25 years", "Color: Red", "Color: Blue" ]; $features = array_reduce($features, function($carry, $item){ $parts = explode(":", $item); $carry[$parts[0]][] = $parts[1]; return $carry; }); foreach ($features as $key => $value) { echo "$key: " . implode(',', $value) . PHP_EOL; }

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.1.70.0030.00317.39
8.1.60.0050.00317.53
8.1.50.0040.00417.53
8.1.40.0030.00617.52
8.1.30.0150.00317.69
8.1.20.0120.00717.61
8.1.10.0160.00317.58
8.1.00.0190.00417.50
8.0.200.0000.00816.84
8.0.190.0050.00216.90
8.0.180.0070.00016.88
8.0.170.0000.00816.79
8.0.160.0070.00816.88
8.0.150.0090.00716.80
8.0.140.0080.00716.76
8.0.130.0080.00615.06
8.0.120.0100.00616.90
8.0.110.0100.00516.82
8.0.100.0100.00516.80
8.0.90.0120.00416.79
8.0.80.0090.01016.84
8.0.70.0110.00416.79
8.0.60.0110.00516.76
8.0.50.0100.00516.83
8.0.30.0140.00616.78
8.0.20.0150.00816.90
8.0.10.0110.00417.04
8.0.00.0160.00816.85
7.4.300.0030.00316.48
7.4.290.0000.00716.41
7.4.280.0030.00516.54
7.4.270.0120.00416.61
7.4.260.0090.00414.92
7.4.250.0110.00416.49
7.4.240.0040.00516.54
7.4.230.0120.00316.50
7.4.220.0100.00216.63
7.4.210.0090.00816.59
7.4.200.0080.00716.60
7.4.190.0090.00916.53
7.4.180.0080.00416.45
7.4.160.0100.01016.60
7.4.150.0110.00216.49
7.4.140.0070.00416.30
7.4.130.0080.01016.46
7.4.120.0110.00616.42
7.4.110.0150.00516.49
7.4.100.0110.00716.53
7.4.90.0130.00516.44
7.4.80.0120.00617.96
7.4.70.0140.00616.38
7.4.60.0130.00616.43
7.4.50.0050.01416.45
7.4.40.0090.00916.42
7.4.30.0110.00716.44
7.4.20.0140.00416.43
7.4.10.0120.00816.47
7.4.00.0160.00316.52
7.3.330.0090.00216.30
7.3.320.0100.00314.84
7.3.310.0090.00616.42
7.3.300.0130.00216.22
7.3.290.0150.00016.24
7.3.280.0230.00016.31
7.3.270.0190.00316.20
7.3.260.0140.00716.35
7.3.250.0150.00816.21
7.3.240.0090.00916.51
7.3.230.0150.00516.50
7.3.220.0170.00716.14
7.3.210.0160.00516.37
7.3.200.0130.00816.36
7.3.190.0120.01016.37
7.3.180.0140.00816.45
7.3.170.0190.00116.35
7.3.160.0140.00716.50
7.3.150.0120.00816.30
7.3.140.0120.00816.28
7.3.130.0130.00716.32
7.3.120.0090.00916.32
7.3.110.0130.01016.22
7.3.100.0150.00516.27
7.3.90.0140.00616.52
7.3.80.0150.00616.42
7.3.70.0150.00616.39
7.3.60.0100.01216.47
7.3.50.0180.00316.51
7.3.40.0170.00416.31
7.3.30.0170.00316.45
7.3.20.0180.00516.45
7.3.10.0180.00316.28
7.3.00.0140.00716.25
7.2.340.0220.00316.48
7.2.330.0160.00816.61
7.2.320.0170.00816.63
7.2.310.0170.00516.53
7.2.300.0180.00416.50
7.2.290.0180.00316.57
7.2.280.0130.00816.64
7.2.270.0090.01416.50
7.2.260.0130.00816.51
7.2.250.0130.00716.46
7.2.240.0170.00516.40
7.2.230.0130.00816.63
7.2.220.0140.00816.61
7.2.210.0140.00616.55
7.2.200.0110.01116.66
7.2.190.0150.00516.58
7.2.180.0130.00816.53
7.2.170.0150.00616.50
7.2.160.0150.00616.55
7.2.150.0140.00816.71
7.2.140.0180.00616.76
7.2.130.0150.00716.74
7.2.120.0170.00616.62
7.2.110.0150.00716.81
7.2.100.0120.01016.74
7.2.90.0120.01216.70
7.2.80.0100.01116.74
7.2.70.0160.00716.69
7.2.60.0160.00416.63
7.2.50.0110.01016.60
7.2.40.0180.00616.63
7.2.30.0140.00916.73
7.2.20.0120.00916.69
7.2.10.0150.00616.69
7.2.00.0130.00816.59

preferences:
11.8 ms | 406 KiB | 5 Q