3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [ "id" => '6230061c0e88d709ca0d7bbc', 'name' => 'Mobile SamSung', 'slug' => 'mobile-samsung', 'createdAt' => '1648006346' ], [ "id" => '5d1eff529a426778d4b92383', 'name' => 'Mobile Iphone', 'slug' => 'mobile-iphone', 'createdAt' => '1647314181' ], [ "id" => '5d1eff6b9a426778d4b92dc4', 'name' => 'Mobile SamSung', 'slug' => 'mobile-samsung', 'createdAt' => '1647314460' ], [ "id" => '5f894011266aea580b028cb0', 'name' => 'Mobile LG', 'slug' => 'mobile-lg', 'createdAt' => '1647314456' ] ]; $result = []; foreach ($arr as $row) { if (!isset($result[$row['name']]) || (int)$row['createdAt'] > (int)$result[$row['name']]['createdAt']) { $result[$row['name']] = $row; } } 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.3.60.0040.01516.75
8.3.50.0150.00020.03
8.3.40.0150.00621.80
8.3.30.0070.00719.34
8.3.20.0070.00024.18
8.3.10.0050.00224.66
8.3.00.0070.00026.16
8.2.180.0110.00425.92
8.2.170.0110.00419.08
8.2.160.0030.01022.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00819.48
8.2.110.0060.00319.29
8.2.100.0040.00817.91
8.2.90.0000.00819.36
8.2.80.0090.00017.97
8.2.70.0000.00817.50
8.2.60.0060.00317.93
8.2.50.0050.00318.07
8.2.40.0040.00418.22
8.2.30.0000.00818.19
8.2.20.0060.00320.38
8.2.10.0050.00318.00
8.2.00.0040.00719.19
8.1.280.0080.00625.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0040.00423.72
8.1.230.0090.00322.68
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0030.00617.50
8.1.190.0040.00417.11
8.1.180.0040.00418.10
8.1.170.0000.00918.55
8.1.160.0000.00718.80
8.1.150.0040.00418.63
8.1.140.0000.00817.45
8.1.130.0030.00518.89
8.1.120.0080.00017.45
8.1.110.0050.00317.44
8.1.100.0040.00417.35
8.1.90.0040.00417.41
8.1.80.0030.00717.46
8.1.70.0000.00717.42
8.1.60.0060.00317.59
8.1.50.0050.00317.41
8.1.40.0260.00417.53
8.1.30.0180.00617.55
8.1.20.0180.00717.48
8.1.10.0210.00517.42
8.1.00.0160.00617.40
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0030.00318.45
8.0.270.0030.00316.68
8.0.260.0030.00318.45
8.0.250.0030.00316.89
8.0.240.0000.00816.97
8.0.230.0030.00316.85
8.0.220.0000.00716.88
8.0.210.0000.00716.94
8.0.200.0070.00016.94
8.0.190.0080.00316.95
8.0.180.0030.00316.90
8.0.170.0160.00416.90
8.0.160.0170.00216.80
8.0.150.0220.00016.68
8.0.140.0180.00316.70
8.0.130.0170.00316.62
8.0.120.0170.00316.95
8.0.110.0200.00016.92
8.0.100.0110.01116.71
8.0.90.0170.00316.82
8.0.80.0100.01016.81
8.0.70.0170.00416.71
8.0.60.0110.01116.85
8.0.50.0000.00916.52
8.0.30.0080.00016.73
8.0.20.0030.00616.69
8.0.10.0040.00416.92
7.4.330.0000.00515.55
7.4.320.0030.00316.66
7.4.300.0050.00316.50
7.4.290.0000.00816.44
7.4.280.0060.00316.56
7.4.270.0040.00416.28
7.4.260.0000.00816.49
7.4.250.0060.00616.11
7.4.240.0090.00416.32
7.4.230.0090.00316.13
7.4.220.0100.00316.57
7.4.210.0120.00016.37
7.4.200.0000.01216.42
7.4.190.0130.00016.29
7.4.180.0090.00416.42
7.4.160.0080.00416.49
7.4.150.0080.00416.38
7.4.140.0120.00016.28
7.4.130.0090.00416.27
7.4.120.0080.00416.30
7.4.110.0050.00516.40
7.4.100.0100.00516.47
7.4.90.0030.00916.45
7.4.80.0060.00616.41
7.4.70.0110.00216.42
7.4.60.0120.00016.23
7.4.50.0030.00716.36
7.4.40.0110.00016.37
7.4.30.0060.00616.42
7.4.20.0110.00016.40
7.4.10.0050.00616.45
7.4.00.0000.01216.48

preferences:
46.08 ms | 400 KiB | 5 Q