3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rows = [ (object)["guestEmail" => "you@booking.com"], (object)["guestEmail" => "you@okay.com"], (object)["guestEmail" => "me@booking.com"], (object)["guestEmail" => "n/a"], (object)["guestEmail" => "somebodyelse@booking.com"], (object)["guestEmail" => "youAgain@BOOKING.COM"] ]; $blacklist = ['@guest.booking.com', '@booking.com', 'N/A', 'n.c@hotel.com', 'n.c@hotels.com']; foreach ($rows as $row) { foreach ($blacklist as $b) { if (stripos($row->guestEmail, $b) !== false) { if (isset($blacklistedcounts[$b])) { // this important to avoid Notices ++$blacklistedcounts[$b]; // increment after the element key exists } else { $blacklistedcounts[$b] = 1; // set 1 on first occurrence } break; // no need to check for other matches for this guestEmail } } } var_export($blacklistedcounts);

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.3.130.0060.00318.76
8.3.120.0090.00620.80
8.3.110.0070.00720.94
8.3.100.0050.00324.06
8.3.90.0040.00426.77
8.3.80.0060.00316.75
8.3.70.0120.00616.70
8.3.60.0040.01818.56
8.3.50.0100.00918.32
8.3.40.0120.00318.83
8.3.30.0120.00318.56
8.3.20.0000.00818.77
8.3.10.0070.00021.90
8.3.00.0030.00523.66
8.2.250.0000.00816.69
8.2.240.0060.00319.14
8.2.230.0090.00022.58
8.2.220.0040.00437.54
8.2.210.0000.00826.77
8.2.200.0060.00316.63
8.2.190.0130.00716.75
8.2.180.0120.00916.38
8.2.170.0120.00622.96
8.2.160.0110.00719.21
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00221.00
8.2.110.0060.00322.13
8.2.100.0120.00017.97
8.2.90.0040.00420.64
8.2.80.0000.00817.97
8.2.70.0050.00318.05
8.2.60.0070.00018.22
8.2.50.0060.00318.10
8.2.40.0030.00622.32
8.2.30.0000.00820.53
8.2.20.0000.00718.06
8.2.10.0080.00018.17
8.2.00.0080.00318.16
8.1.300.0000.00820.34
8.1.290.0050.00518.88
8.1.280.0070.01425.92
8.1.270.0000.00920.33
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00022.50
8.1.230.0060.00620.88
8.1.220.0040.00417.91
8.1.210.0040.00418.96
8.1.200.0040.00417.35
8.1.190.0060.00317.25
8.1.180.0040.00418.10
8.1.170.0000.00818.47
8.1.160.0070.00018.82
8.1.150.0030.00518.86
8.1.140.0040.00418.81
8.1.130.0080.00017.43
8.1.120.0040.00417.37
8.1.110.0040.00417.45
8.1.100.0040.00417.46
8.1.90.0030.00517.45
8.1.80.0000.00717.50
8.1.70.0000.00717.50
8.1.60.0040.00417.60
8.1.50.0000.00917.42
8.1.40.0060.00317.54
8.1.30.0000.00817.57
8.1.20.0000.00717.70
8.1.10.0000.00717.65
8.1.00.0020.00517.38
8.0.300.0000.00819.76
8.0.290.0050.00316.88
8.0.280.0030.00318.31
8.0.270.0030.00317.14
8.0.260.0000.00716.89
8.0.250.0030.00317.02
8.0.240.0000.00617.04
8.0.230.0000.00616.89
8.0.220.0070.00017.00
8.0.210.0040.00416.99
8.0.200.0060.00016.98
8.0.190.0040.00416.91
8.0.180.0080.00017.00
8.0.170.0030.00616.98
8.0.160.0070.00016.86
8.0.150.0000.00716.91
8.0.140.0000.00716.89
8.0.130.0000.00913.40
8.0.120.0040.00416.86
8.0.110.0080.00016.95
8.0.100.0050.00216.79
8.0.90.0000.00716.91
8.0.80.0090.00716.95
8.0.70.0050.00217.07
8.0.60.0040.00416.78
8.0.50.0050.00216.91
8.0.30.0120.00617.20
8.0.20.0150.00617.40
8.0.10.0070.00016.98
8.0.00.0130.00416.74
7.4.330.0050.00015.55
7.4.320.0000.00616.43
7.4.300.0030.00316.66
7.4.290.0040.00416.50
7.4.280.0030.00616.60
7.4.270.0040.00416.46
7.4.260.0100.00016.61
7.4.250.0040.00416.59
7.4.240.0030.00316.51
7.4.230.0040.00416.57
7.4.220.0000.00716.71
7.4.210.0030.01116.56
7.4.200.0030.00316.70
7.4.140.0080.01117.86
7.4.130.0100.01016.57
7.4.120.0090.00816.59
7.4.110.0100.01016.72
7.4.100.0150.00316.64
7.4.90.0190.00716.64
7.4.80.0090.00919.39
7.4.70.0120.00616.59
7.4.60.0090.01216.66
7.4.50.0070.01116.41
7.4.40.0130.00416.59
7.4.00.0070.00714.98
7.3.330.0030.00313.09
7.3.320.0030.00313.15
7.3.310.0040.00416.35
7.3.300.0000.00716.43
7.3.290.0070.00016.46
7.3.280.0040.01816.40
7.3.260.0100.01216.60
7.3.240.0100.00816.42
7.3.230.0100.00716.60
7.3.210.0150.00616.38
7.3.200.0050.01116.47
7.3.190.0030.01316.29
7.3.180.0030.01316.24
7.3.170.0190.00016.39
7.3.160.0000.01816.66
7.2.330.0090.01316.86
7.2.320.0060.01216.78
7.2.310.0070.01316.78
7.2.300.0120.00916.73
7.2.290.0060.00916.73
7.2.100.4150.00314.73
7.2.90.5190.00714.61
7.2.80.4650.00714.85
7.2.70.3940.00315.15
7.2.60.3290.01014.78
7.2.50.3560.00315.16
7.2.40.4090.01614.93
7.2.30.4000.00315.12
7.2.20.4230.01014.94
7.2.10.3790.00314.91
7.2.00.3800.01014.83
7.1.220.4160.01013.96
7.1.210.4320.01013.98
7.1.200.4230.01213.95
7.1.190.4280.00714.14
7.1.180.3860.00313.83
7.1.170.3580.01013.59
7.1.160.4930.00513.98
7.1.150.4050.00313.37
7.1.140.4050.00314.04
7.1.130.5280.00313.75
7.1.120.4270.01314.08
7.1.110.5120.01013.84
7.1.100.4720.01914.09
7.1.90.5280.01014.08
7.1.80.4970.01313.93
7.1.70.5420.00713.86
7.1.60.4270.01031.80
7.1.50.7660.01032.06
7.1.40.3280.00331.87
7.1.30.9020.02031.74
7.1.20.9410.01331.69
7.1.11.0650.00013.74
7.1.00.5480.01013.88
5.6.380.0080.00814.05

preferences:
26.72 ms | 403 KiB | 5 Q