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" ]; $carsBySelection = array_filter($cars, function($car) use ($selection) { return in_array($car["id"], $selection); }); print_r($carsBySelection);

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.18
8.5.00.0140.00920.22
8.4.150.0020.00114.05
8.4.140.0140.00717.39
8.4.130.0120.00817.70
8.4.120.0080.01120.30
8.4.110.0110.00922.38
8.4.100.0130.00818.95
8.4.90.0100.00820.56
8.4.80.0080.00718.89
8.4.70.0110.00917.84
8.4.60.0150.00518.72
8.4.50.0160.00417.88
8.4.40.0090.01220.53
8.4.30.0000.00818.86
8.4.20.0100.01019.48
8.4.10.0000.01122.13
8.3.280.0130.00718.46
8.3.270.0130.00816.66
8.3.260.0100.00916.76
8.3.250.0120.00818.77
8.3.240.0100.00916.56
8.3.230.0110.00816.86
8.3.220.0120.00619.16
8.3.210.0050.00316.60
8.3.200.0050.00416.84
8.3.190.0120.00716.98
8.3.180.0070.00216.74
8.3.170.0180.00018.87
8.3.160.0150.00316.48
8.3.150.0130.00618.94
8.3.140.0050.00320.64
8.3.130.0000.00818.17
8.3.120.0030.00620.65
8.3.110.0050.00320.94
8.3.100.0000.01824.06
8.3.90.0040.00426.77
8.3.80.0000.01417.97
8.3.70.0100.00616.50
8.3.60.0130.00616.50
8.3.50.0110.01116.42
8.3.40.0100.00719.97
8.3.30.0040.01118.61
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0050.00416.61
8.2.280.0060.00218.43
8.2.270.0110.00716.54
8.2.260.0070.01116.63
8.2.250.0080.00016.53
8.2.240.0000.00818.61
8.2.230.0090.00022.58
8.2.220.0080.00037.54
8.2.210.0080.00026.77
8.2.200.0070.00316.50
8.2.190.0100.01016.82
8.2.180.0070.01016.50
8.2.170.0140.00018.90
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00019.79
8.2.110.0040.00722.11
8.2.100.0040.00718.22
8.2.90.0080.00020.01
8.2.80.0050.00317.97
8.2.70.0040.00418.05
8.2.60.0030.00617.93
8.2.50.0040.00418.10
8.2.40.0000.00920.60
8.2.30.0090.00518.58
8.2.20.0140.00318.73
8.2.10.0120.00418.78
8.2.00.0110.00518.82
8.1.330.0120.00720.28
8.1.320.0160.00316.13
8.1.310.0070.00316.05
8.1.300.0090.00620.27
8.1.290.0030.00630.84
8.1.280.0070.01025.92
8.1.270.0110.00324.66
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0030.00622.01
8.1.230.0080.00320.95
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0040.00717.48
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0060.01118.36
8.1.160.0100.00718.47
8.1.150.0130.00318.45
8.1.140.0150.00018.31
8.1.130.0110.00518.23
8.1.120.0080.00818.46
8.1.110.0070.01018.35
8.1.100.0130.00418.21
8.1.90.0140.00518.51
8.1.80.0140.00218.34
8.1.70.0200.00018.50
8.1.60.0210.00018.42
8.1.50.0160.00318.38
8.1.40.0170.00218.59
8.1.30.0140.00318.31
8.1.20.0130.00618.60
8.1.10.0120.00618.16
8.1.00.0090.00918.43
8.0.300.0040.00419.64
8.0.290.0000.00916.63
8.0.280.0140.00617.67
8.0.270.0140.00417.68
8.0.260.0130.00417.70
8.0.250.0080.00817.91
8.0.240.0050.01117.62
8.0.230.0160.00317.62
8.0.220.0100.00717.62
8.0.210.0130.00317.62
8.0.200.0130.00417.62
8.0.190.0090.00917.71
8.0.180.0160.00017.62
8.0.170.0140.00317.62
8.0.160.0140.00717.66
8.0.150.0150.00417.62
8.0.140.0160.00417.64
8.0.130.0170.00017.62
8.0.120.0140.00317.98
8.0.110.0100.00717.86
8.0.100.0170.00017.73
8.0.90.0090.00917.62
8.0.80.0130.00517.62
8.0.70.0080.00817.62
8.0.60.0140.00317.62
8.0.50.0130.00417.63
8.0.30.0120.00517.66
8.0.20.0040.01218.04
8.0.10.0080.00817.80

preferences:
108.41 ms | 403 KiB | 5 Q