3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attributes = [ [ "attributeName"=> "Name", "value"=> "Paul" ], [ "attributeName"=> "Name", "value"=> "Steve" ], [ "attributeName"=> "Name", "value"=> "John" ], [ "attributeName"=> "Name", "value"=> "Andrew" ], [ "attributeName"=> "Destination", "value"=> "London" ], [ "attributeName"=> "Destination", "value"=> "Paris" ], [ "attributeName"=> "Destination", "value"=> "Ankara" ], [ "attributeName"=> "Destination", "value"=> "Kuwait" ], ]; $output = array_reduce($attributes, function ($carry, $arr) { $carry[$arr['attributeName']][] = $arr['value']; return $carry; }, array()); print_r($output); echo "<table>\n"; foreach ($output as $key => $values) { echo "<tr><td>$key</td><td>" . implode('</td><td>', $values) . "</td></tr>\n"; } echo '</table>';

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.140.0100.01217.61
8.4.130.0140.00617.86
8.4.120.0130.00620.56
8.4.110.0140.00622.41
8.4.100.0100.00717.71
8.4.90.0130.00818.73
8.4.80.0050.00417.67
8.4.70.0090.01017.59
8.4.60.0080.01218.58
8.4.50.0060.00418.85
8.4.40.0170.00317.62
8.4.30.0060.00920.55
8.4.20.0150.00617.71
8.4.10.0100.00019.52
8.3.270.0120.00816.74
8.3.260.0110.00916.78
8.3.250.0120.00719.05
8.3.240.0100.00116.25
8.3.230.0110.00916.41
8.3.220.0140.00517.41
8.3.210.0120.00516.61
8.3.200.0120.00716.86
8.3.190.0090.00817.11
8.3.180.0090.00616.49
8.3.170.0140.00416.95
8.3.160.0110.00816.73
8.3.150.0080.00018.29
8.3.140.0000.00816.89
8.3.130.0110.00718.28
8.3.120.0140.00318.91
8.3.110.0060.00320.94
8.3.100.0050.00524.06
8.3.90.0040.01116.86
8.3.80.0090.00016.50
8.3.70.0120.00316.58
8.3.60.0070.01118.43
8.3.50.0100.00724.43
8.3.40.0110.00421.65
8.3.30.0090.00618.73
8.3.20.0080.00024.18
8.3.10.0030.00524.66
8.3.00.0000.00826.16
8.2.290.0100.00820.46
8.2.280.0120.00918.19
8.2.270.0110.00417.35
8.2.260.0160.00319.08
8.2.250.0080.00018.55
8.2.240.0060.00317.31
8.2.230.0000.00922.58
8.2.220.0030.00637.54
8.2.210.0070.00026.77
8.2.200.0070.00316.50
8.2.190.0090.00916.63
8.2.180.0030.01725.92
8.2.170.0140.00718.96
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0030.00724.66
8.2.130.0050.00226.16
8.2.120.0040.00426.35
8.2.110.0060.00319.31
8.2.100.0040.00819.57
8.2.90.0000.00819.33
8.2.80.0000.00817.97
8.2.70.0040.00417.75
8.2.60.0050.00318.05
8.2.50.0060.00318.07
8.2.40.0080.00019.89
8.2.30.0000.00818.06
8.2.20.0080.00018.14
8.2.10.0000.00719.32
8.2.00.0030.00319.23
8.1.330.0110.00621.88
8.1.320.0150.00316.36
8.1.310.0050.00318.45
8.1.300.0050.00518.42
8.1.290.0060.00318.88
8.1.280.0150.00325.92
8.1.270.0030.00622.18
8.1.260.0040.00428.09
8.1.250.0070.00328.09
8.1.240.0000.00921.31
8.1.230.0110.00022.12
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0090.00017.48
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0050.00318.65
8.1.160.0000.00718.89
8.1.150.0090.00018.77
8.1.140.0100.00018.97
8.1.130.0070.00020.06
8.1.120.0040.00417.38
8.1.110.0050.00317.48
8.1.100.0050.00317.48
8.1.90.0000.00817.51
8.1.80.0050.00317.49
8.1.70.0000.00817.46
8.1.60.0030.00617.60
8.1.50.0050.00317.54
8.1.40.0050.00317.50
8.1.30.0000.00817.62
8.1.20.0050.00217.66
8.1.10.0040.00417.48
8.1.00.0040.00417.41
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0000.00717.97
8.0.260.0000.00618.54
8.0.250.0000.00717.01
8.0.240.0060.00016.88
8.0.230.0000.00716.86
8.0.220.0000.00716.86
8.0.210.0000.00816.92
8.0.200.0000.00716.93
8.0.190.0000.00716.95
8.0.180.0040.00416.89
8.0.170.0030.00516.95
8.0.160.0040.00416.93
8.0.150.0070.00016.77
8.0.140.0020.00516.88
8.0.130.0000.00613.29
8.0.120.0000.00716.82
8.0.110.0000.00816.97
8.0.100.0080.00016.75
8.0.90.0070.00017.00
8.0.80.0040.01016.88
8.0.70.0040.00416.91
8.0.60.0070.00016.70
8.0.50.0050.00316.80
8.0.30.0060.01216.89
8.0.20.0070.01116.92
8.0.10.0040.00417.05
8.0.00.0040.01316.66
7.4.330.0050.00015.55
7.4.320.0030.00316.54
7.4.300.0060.00016.44
7.4.290.0040.00416.54
7.4.280.0050.00316.52
7.4.270.0070.00016.46
7.4.260.0000.00613.35
7.4.250.0000.00816.40
7.4.240.0040.00416.50
7.4.230.0030.00316.64
7.4.220.0000.00716.43
7.4.210.0040.01216.52
7.4.200.0000.00716.72
7.4.130.0120.00616.53
7.4.120.0070.01116.43
7.4.110.0130.01016.20
7.4.100.0110.01116.54
7.4.90.0060.01216.45
7.4.80.0030.01316.45
7.4.70.0080.00916.32
7.4.60.0150.00316.47
7.4.50.0100.00716.56
7.4.40.0090.00916.43
7.4.30.0170.00816.45
7.4.20.0140.01116.50
7.4.10.0110.01116.23
7.4.00.0210.00316.39
7.3.330.0000.00716.31
7.3.320.0070.00013.32
7.3.310.0040.00416.14
7.3.300.0030.00316.39
7.3.290.0080.00716.34
7.3.260.0140.00316.53
7.3.250.0110.01116.53
7.3.240.0090.00916.38
7.3.230.0130.01016.33
7.3.220.0070.01616.40
7.3.210.0110.00616.62
7.3.200.0100.00716.44
7.3.190.0040.01516.53
7.3.180.0130.00316.32
7.3.170.0080.00816.33
7.3.160.0090.00916.64
7.3.150.0070.01516.44
7.3.140.0120.01216.40
7.3.130.0130.01016.32
7.3.120.0110.00716.55
7.3.110.0060.01216.62
7.3.100.0080.00816.41
7.3.90.0100.00716.56
7.3.80.0160.00616.54
7.3.70.0070.01016.29
7.3.60.0060.00916.36
7.3.50.0120.00416.50
7.3.40.0110.00516.29
7.3.30.0060.01116.21
7.3.20.0070.01116.32
7.3.10.0070.01016.41
7.3.00.0130.00616.31

preferences:
29.84 ms | 403 KiB | 5 Q