3v4l.org

run code in 300+ PHP versions simultaneously
<?php $item = [1,2,11, 4]; $products = [["id" => 1, "name" => "abc"], ["id" => 2, "name"=> "xyz"]]; // Get the ids of all products as an indexed array $prodIds = array_column($products, 'id'); // Check the id's that exists in both $existingIds = array_intersect($item, $prodIds); print_r($existingIds);

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.00.0130.00819.85
8.4.150.0020.00114.05
8.4.140.0140.00817.52
8.4.130.0100.01017.76
8.4.120.0120.00820.44
8.4.110.0050.00418.58
8.4.100.0130.00617.61
8.4.90.0040.00520.65
8.4.80.0030.00524.18
8.4.70.0100.01018.78
8.4.60.0090.01120.36
8.4.50.0110.00620.29
8.4.40.0100.01019.37
8.4.30.0170.00320.08
8.4.20.0140.00717.82
8.4.10.0050.00518.56
8.3.280.0010.00114.05
8.3.270.0150.00416.54
8.3.260.0150.00416.38
8.3.250.0100.00918.79
8.3.240.0080.00416.51
8.3.230.0140.00416.39
8.3.220.0090.00918.93
8.3.210.0040.00318.56
8.3.200.0040.00416.51
8.3.190.0130.00616.82
8.3.180.0120.00618.90
8.3.170.0110.00718.54
8.3.160.0000.00818.91
8.3.150.0040.00416.99
8.3.140.0040.00416.57
8.3.130.0160.00016.67
8.3.120.0120.00319.04
8.3.110.0150.00020.94
8.3.100.0060.00324.06
8.3.90.0000.00826.77
8.3.80.0060.00316.63
8.3.70.0040.01116.58
8.3.60.0180.00316.50
8.3.50.0130.00719.98
8.3.40.0070.01120.20
8.3.30.0060.00919.10
8.3.20.0050.00324.18
8.3.10.0100.00724.66
8.3.00.0090.00026.16
8.2.290.0110.00816.85
8.2.280.0140.00518.55
8.2.270.0100.01016.44
8.2.260.0080.00816.92
8.2.250.0080.00018.55
8.2.240.0030.00616.95
8.2.230.0040.00822.58
8.2.220.0040.00437.54
8.2.210.0000.00826.77
8.2.200.0090.00016.63
8.2.190.0120.00316.58
8.2.180.0130.00725.92
8.2.170.0100.01019.01
8.2.160.0130.01022.96
8.2.150.0000.00725.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00019.77
8.2.110.0050.00522.25
8.2.100.0000.01117.91
8.2.90.0050.00317.72
8.2.80.0030.00618.57
8.2.70.0000.00817.38
8.2.60.0040.00417.80
8.2.50.0050.00518.07
8.2.40.0000.00818.16
8.2.30.0040.00418.28
8.2.20.0000.00720.47
8.2.10.0040.00418.06
8.2.00.0000.00719.19
8.1.330.0110.00715.94
8.1.320.0100.00917.90
8.1.310.0080.00016.84
8.1.300.0090.00616.12
8.1.290.0090.00018.88
8.1.280.0130.01025.92
8.1.270.0040.00420.64
8.1.260.0030.00526.35
8.1.250.0000.00728.09
8.1.240.0030.00619.00
8.1.230.0070.00419.01
8.1.220.0050.00317.79
8.1.210.0040.00418.77
8.1.200.0060.00317.00
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0060.00318.48
8.1.160.0000.00718.81
8.1.150.0040.00418.63
8.1.140.0050.00217.38
8.1.130.0000.00718.87
8.1.120.0040.00417.39
8.1.110.0030.00617.34
8.1.100.0060.00317.29
8.1.90.0050.00217.26
8.1.80.0030.00417.33
8.1.70.0030.00317.45
8.1.60.0000.00817.56
8.1.50.0060.00317.41
8.1.40.0130.01217.40
8.1.30.0220.00417.59
8.1.20.0190.00617.52
8.1.10.0180.00717.41
8.1.00.0230.00317.25
8.0.300.0070.00018.77
8.0.290.0040.00416.58
8.0.280.0070.00018.38
8.0.270.0070.00016.66
8.0.260.0060.00018.41
8.0.250.0000.00716.79
8.0.240.0040.00416.82
8.0.230.0030.00316.78
8.0.220.0030.00316.71
8.0.210.0070.00016.79
8.0.200.0050.00316.86
8.0.190.0040.00416.74
8.0.180.0000.00716.81
8.0.170.0160.00516.75
8.0.160.0180.00316.78
8.0.150.0160.00516.77
8.0.140.0170.00316.75
8.0.130.0190.00316.61
8.0.120.0170.00316.73
8.0.110.0190.00416.79
8.0.100.0110.01116.84
8.0.90.0180.00316.72
8.0.80.0190.00016.70
8.0.70.0150.00716.75
8.0.60.0200.00016.61
8.0.50.0180.00316.60
8.0.30.0200.00016.65
8.0.20.0170.00416.74
8.0.10.0150.00616.96
7.4.330.0030.00315.55
7.4.320.0030.00316.59
7.4.300.0050.00316.34
7.4.290.0040.00416.54
7.4.280.0210.00416.41
7.4.270.0160.00816.32
7.4.260.0170.00616.46
7.4.250.0100.00716.30
7.4.240.0110.00816.50
7.4.230.0170.00316.40
7.4.220.0190.00016.52
7.4.210.0120.00816.42
7.4.200.0180.00316.53
7.4.190.0160.00516.55
7.4.180.0210.00016.60
7.4.160.0140.00716.48
7.4.150.0140.00716.51
7.4.140.0080.01316.50
7.4.130.0140.00516.23
7.4.120.0170.00316.23
7.4.110.0120.00816.22
7.4.100.0180.00416.41
7.4.90.0150.00416.20
7.4.80.0160.00416.30
7.4.70.0140.00716.30
7.4.60.0160.00316.32
7.4.50.0130.00816.25
7.4.40.0100.01016.23
7.4.30.0190.00316.22
7.4.20.0100.01016.27
7.4.10.0150.00616.40
7.4.00.0150.00516.25

preferences:
28.22 ms | 403 KiB | 5 Q