3v4l.org

run code in 300+ PHP versions simultaneously
<?php $whiteList = [ ['code' => '123', 'name' => 'ABC',], ['code' => '456', 'name' => 'XYZ',], ]; $pricedList = [ ['code' => '123', 'name' => 'ABC', 'price' => '34'], ['code' => '456', 'name' => 'PQR', 'price' => '56'], ['name' => 'XYZ', 'code' => '456', 'price' => '90'], ['code' => '456', 'name' => 'GHI', 'price' => '70'], ]; $result = []; foreach ($pricedList as $pricedRow) { foreach ($whiteList as $whiteRow) { if ($whiteRow === array_intersect_assoc($whiteRow, $pricedRow)) { $result[] = $pricedRow; continue 2; // no reason to keep iterating inner loop after match is found } } } var_export($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.5.10.0130.00716.65
8.5.00.0110.01020.07
8.4.160.0090.01523.18
8.4.150.0020.00014.05
8.4.140.0100.01017.89
8.4.130.0070.00917.82
8.4.120.0110.00820.82
8.4.110.0090.01022.41
8.4.100.0080.01217.79
8.4.90.0140.00818.71
8.4.80.0120.00917.73
8.4.70.0070.00817.83
8.4.60.0130.00718.84
8.4.50.0100.00820.46
8.4.40.0160.00317.67
8.4.30.0080.00018.82
8.4.20.0160.00318.00
8.4.10.0060.00319.29
8.3.280.0120.00918.63
8.3.270.0130.00616.53
8.3.260.0090.01016.50
8.3.250.0100.00918.95
8.3.240.0080.01016.77
8.3.230.0120.00716.54
8.3.220.0030.00517.04
8.3.210.0080.00718.48
8.3.200.0040.00416.78
8.3.190.0090.00617.09
8.3.180.0040.00418.59
8.3.170.0110.00720.71
8.3.160.0120.00618.91
8.3.150.0110.00418.39
8.3.140.0040.00417.34
8.3.130.0030.00518.39
8.3.120.0040.01220.75
8.3.110.0030.00516.52
8.3.100.0040.00716.79
8.3.90.0060.00326.77
8.3.80.0060.00318.06
8.3.70.0090.00618.18
8.3.60.0150.00318.25
8.3.50.0190.00616.68
8.3.40.0040.01120.52
8.3.30.0110.00720.18
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0040.01828.09
8.2.290.0090.00920.53
8.2.280.0060.00418.23
8.2.270.0140.00318.88
8.2.260.0060.01218.59
8.2.250.0000.00818.27
8.2.240.0090.00017.30
8.2.230.0080.00820.94
8.2.220.0160.00624.06
8.2.210.0040.00426.77
8.2.200.0030.00616.75
8.2.190.0190.00016.63
8.2.180.0070.01416.48
8.2.170.0110.00418.91
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0060.00324.66
8.2.130.0120.00628.09
8.2.120.0190.00028.09
8.2.110.0110.00828.09
8.2.100.0120.00628.09
8.2.90.0110.00728.09
8.2.80.0120.00328.09
8.2.70.0100.01028.09
8.2.60.0040.01228.09
8.2.50.0150.00028.09
8.2.40.0130.00328.09
8.2.30.0100.00728.09
8.2.20.0080.00828.09
8.2.10.0100.00728.09
8.2.00.0120.00328.09
8.1.330.0030.00422.05
8.1.320.0120.00815.75
8.1.310.0050.00318.33
8.1.300.0040.00418.54
8.1.290.0030.00630.84
8.1.280.0100.01025.92
8.1.270.0030.00622.19
8.1.260.0070.01128.09
8.1.250.0100.00628.09
8.1.240.0000.01528.09
8.1.230.0140.00028.09
8.1.220.0190.00028.09
8.1.210.0090.00928.09
8.1.200.0040.01128.09
8.1.190.0040.00428.09
8.1.180.0000.00828.09
8.1.170.0040.00428.09
8.1.160.0040.00428.09
8.1.150.0070.01128.09
8.1.140.0120.00628.09
8.1.130.0080.00028.09
8.1.120.0090.00928.09
8.1.110.0080.00028.09
8.1.100.0030.00528.09
8.1.90.0030.00528.09
8.1.80.0070.01128.09
8.1.70.0080.00028.09
8.1.60.0080.00028.09
8.1.50.0080.00028.09
8.1.40.0080.00028.09
8.1.30.0000.00928.09
8.1.20.0040.00428.09
8.1.10.0040.00428.09
8.1.00.0080.00028.09

preferences:
36.91 ms | 403 KiB | 5 Q