3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cars = [ 0 => ["id" => 1, "name" => "FORD"], 1 => ["id" => 2, "name" => "BMW"], 2 => ["id" => 3, "name" => "FIAT"], 3 => ["id" => 4, "name" => "RENAULT"], 4 => ["id" => 5, "name" => "BENTLEY"], ]; $selection = [ 0 => "1", 1 => "3", 2 => "4" ]; $cars_by_id = array_column($cars, null, 'id'); $selected_cars = array_intersect_key($cars_by_id, array_flip($selection)); var_dump($selected_cars);

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.5.10.0120.00620.13
8.5.00.0150.00819.95
8.4.160.0170.00523.52
8.4.150.0030.00014.05
8.4.140.0180.00717.59
8.4.130.0150.00417.46
8.4.120.0050.00523.91
8.4.110.0140.00518.91
8.4.100.0140.00717.48
8.4.90.0140.00718.73
8.4.80.0050.00617.65
8.4.70.0110.00617.89
8.4.60.0130.00718.70
8.4.50.0070.00219.12
8.4.40.0160.00420.46
8.4.30.0030.00620.58
8.4.20.0170.00319.58
8.4.10.0030.00623.95
8.3.280.0050.00520.05
8.3.270.0110.00816.60
8.3.260.0070.00916.41
8.3.250.0130.00518.85
8.3.240.0120.00616.86
8.3.230.0050.00516.61
8.3.220.0120.00617.28
8.3.210.0100.00918.32
8.3.200.0100.00916.41
8.3.190.0130.00617.25
8.3.180.0090.00716.31
8.3.170.0160.00316.82
8.3.160.0040.01120.07
8.3.150.0030.01818.45
8.3.140.0050.00316.95
8.3.130.0030.00518.43
8.3.120.0110.00818.66
8.3.110.0090.00020.94
8.3.100.0120.00324.06
8.3.90.0090.00926.77
8.3.80.0040.00417.97
8.3.70.0060.01216.48
8.3.60.0120.00616.50
8.3.50.0140.00716.67
8.3.40.0070.00720.12
8.3.30.0120.00318.39
8.3.20.0040.00424.18
8.3.10.0000.00724.66
8.3.00.0040.00426.16
8.2.290.0130.00720.31
8.2.280.0130.00820.20
8.2.270.0150.00417.25
8.2.260.0090.00016.35
8.2.250.0050.00316.75
8.2.240.0060.00318.82
8.2.230.0030.00622.58
8.2.220.0130.00337.54
8.2.210.0120.00626.77
8.2.200.0060.00318.29
8.2.190.0150.00018.16
8.2.180.0140.00316.75
8.2.170.0160.00618.69
8.2.160.0130.00722.96
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0040.00420.71
8.2.110.0050.00522.30
8.2.100.0090.00320.41
8.2.40.0050.00620.53
8.1.330.0110.00821.80
8.1.320.0080.01116.21
8.1.310.0070.00718.51
8.1.300.0090.00019.57
8.1.290.0040.00430.84
8.1.280.0070.00725.92
8.1.270.0040.00424.66
8.1.260.0090.00926.35
8.1.250.0060.00328.09
8.1.240.0080.00318.53
8.1.230.0100.00020.13

preferences:
31.85 ms | 403 KiB | 5 Q