3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aMbs = [ ['ID' => 1, 'Name' => 'Standard'], ['ID' => 2, 'Name' => 'Silver'], ['ID' => 3, 'Name' => 'Gold'], ['ID' => 4, 'Name' => 'Platinum'], ['ID' => 5, 'Name' => 'Unobtainium'], ]; $ignoreArray = [1, 3]; $aMemberships = []; foreach ($aMbs as ['ID' => $id, 'Name' => $name]) { if (!in_array($id, $ignoreArray)) { $aMemberships[$id] = $name; } } var_export($aMemberships);

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.00616.67
8.5.00.0130.00819.92
8.4.160.0110.01123.79
8.4.150.0020.00114.05
8.4.140.0140.00917.74
8.4.130.0130.00817.54
8.4.120.0080.00820.57
8.4.110.0110.00822.38
8.4.100.0070.01017.67
8.4.90.0120.00617.89
8.4.80.0100.01117.84
8.4.70.0120.00917.87
8.4.60.0100.01117.74
8.4.50.0120.00918.84
8.4.40.0080.01117.71
8.4.30.0100.01018.87
8.4.20.0170.00321.32
8.4.10.0030.00619.38
8.3.280.0070.00318.43
8.3.270.0130.00716.49
8.3.260.0120.00716.42
8.3.250.0110.00718.81
8.3.240.0120.00716.56
8.3.230.0100.00916.41
8.3.220.0100.00617.34
8.3.210.0060.01216.49
8.3.200.0110.00916.85
8.3.190.0130.00517.14
8.3.180.0090.00619.00
8.3.170.0120.00618.79
8.3.160.0090.00917.15
8.3.150.0000.01017.10
8.3.140.0150.00316.58
8.3.130.0060.00318.61
8.3.120.0070.00720.67
8.3.110.0000.00820.94
8.3.100.0040.00416.63
8.3.90.0040.00426.77
8.3.80.0040.00417.97
8.3.70.0100.00318.43
8.3.60.0240.00617.97
8.3.50.0040.00818.33
8.3.40.0240.00017.97
8.3.30.0190.00417.97
8.3.20.0160.00817.97
8.3.10.0210.00017.97
8.3.00.0210.00017.97
8.2.290.0080.00922.22
8.2.280.0100.00816.73
8.2.270.0100.00717.24
8.2.260.0030.00618.21
8.2.250.0030.00716.54
8.2.240.0030.00716.89
8.2.230.0050.00522.58
8.2.220.0080.00024.06
8.2.210.0110.00426.77
8.2.200.0030.00618.29
8.2.190.0180.00617.97
8.2.180.0150.00817.97
8.2.170.0270.00017.97
8.2.160.0140.01017.97
8.2.150.0240.00017.97
8.2.140.0200.00417.97
8.2.130.0180.00517.97
8.2.120.0280.00017.97
8.2.110.0200.00317.97
8.2.100.0220.00317.97
8.2.90.0240.00317.97
8.2.80.0240.00317.97
8.2.70.0220.01117.97
8.2.60.0290.00318.75
8.2.50.0170.00617.97
8.2.40.0120.01217.97
8.2.30.0160.00817.97
8.2.20.0210.00017.97
8.2.10.0130.00817.97
8.2.00.0190.00617.97
8.1.330.0090.01023.81
8.1.320.0120.00716.30
8.1.310.0140.00016.81
8.1.300.0040.01518.49
8.1.290.0060.00630.84
8.1.280.0250.00317.97
8.1.270.0250.00417.97
8.1.260.0230.00317.97
8.1.250.0210.00717.97
8.1.240.0200.00717.97
8.1.230.0230.00317.97
8.1.220.0230.00417.97
8.1.210.0330.00417.97
8.1.200.0290.00317.97
8.1.190.0160.00817.97
8.1.180.0200.00717.97
8.1.170.0210.00417.97
8.1.160.0160.00417.97
8.1.150.0100.01017.97
8.1.140.0150.00617.97
8.1.130.0200.00017.97
8.1.120.0200.00017.97
8.1.110.0120.00817.97
8.1.100.0160.00417.97
8.1.90.0220.00017.97
8.1.80.0090.01317.97
8.1.70.0240.00417.97
8.1.60.0190.00617.97
8.1.50.0220.00017.97
8.1.40.0190.00517.97
8.1.30.0120.01217.97
8.1.20.0230.00417.97
8.1.10.0220.00417.97
8.1.00.0230.00417.97

preferences:
36.17 ms | 403 KiB | 5 Q