3v4l.org

run code in 300+ PHP versions simultaneously
<?php $emailDomain = 'subdomain.example.co.uk'; $domainParts = explode('.', $emailDomain); // The TLD will never be in the allow list, so we can pop it off first $domain = array_pop($domainParts); $listToCheck = []; foreach (array_reverse($domainParts) as $domainPart) { $domain = $domainPart .'.'. $domain; $listToCheck[] = $domain; } var_dump($listToCheck);

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.4.120.0100.01024.25
8.4.110.0120.00819.53
8.4.100.0140.00718.98
8.4.90.0050.00422.21
8.4.80.0040.00518.73
8.4.70.0060.00319.64
8.4.60.0360.00917.58
8.4.50.0380.00917.81
8.4.40.0410.01117.37
8.4.30.0380.01017.43
8.4.20.0380.01217.50
8.4.10.0400.01217.35
8.3.250.0080.00919.05
8.3.240.0120.00717.22
8.3.230.0130.00616.85
8.3.220.0070.00919.07
8.3.210.0110.00716.81
8.3.200.0340.01016.56
8.3.190.0370.00816.55
8.3.180.0210.00516.41
8.3.170.0160.00516.34
8.3.160.0180.00316.55
8.3.150.0300.00516.39
8.3.140.0350.00916.46
8.3.130.0230.00216.54
8.3.120.0290.00616.63
8.3.110.0290.01316.64
8.3.100.0430.01016.70
8.3.90.0440.00716.66
8.3.80.0330.01316.28
8.3.70.0380.01316.57
8.3.60.0420.00716.39
8.3.50.0370.01016.46
8.3.40.0360.01017.64
8.3.30.0330.00717.48
8.3.20.0310.00717.21
8.3.10.0260.01117.48
8.3.00.0190.00417.39
8.2.290.0110.00920.50
8.2.280.0320.00816.55
8.2.270.0290.01116.40
8.2.260.0300.00916.29
8.2.250.0330.00716.24
8.2.240.0280.01216.42
8.2.230.0350.00716.20
8.2.220.0300.00916.25
8.2.210.0330.00716.20
8.2.200.0250.01316.33
8.2.190.0310.00916.22
8.2.180.0340.00816.20
8.2.170.0310.01217.67
8.2.160.0390.00317.63
8.2.150.0360.00617.72
8.2.140.0210.00417.62
8.2.130.0150.00417.64
8.2.120.0370.00617.50
8.2.110.0340.00717.63
8.2.100.0270.00917.64
8.2.90.0280.00917.59
8.2.80.0310.00717.50
8.2.70.0370.00717.63
8.2.60.0400.00417.62
8.2.50.0360.00517.76
8.2.40.0330.00417.63
8.2.30.0300.00817.49
8.2.20.0340.00617.59
8.2.10.0280.00917.75
8.2.00.0320.00617.51

preferences:
27.81 ms | 403 KiB | 5 Q