3v4l.org

run code in 500+ 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.5.90.0100.00616.86
8.5.80.0090.00816.71
8.5.70.0110.00618.61
8.5.60.0110.00616.91
8.5.50.0080.00716.71
8.5.30.0120.00518.13
8.5.20.0090.00820.32
8.5.10.0100.00916.43
8.5.00.0160.00520.18
8.4.240.0180.00519.48
8.4.230.0120.00919.66
8.4.220.0080.00419.56
8.4.210.0060.00521.35
8.4.180.0130.00919.62
8.4.170.0150.00622.04
8.4.160.0120.01222.03
8.4.150.0080.00516.77
8.4.140.0120.00917.52
8.4.130.0110.00918.79
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.330.0060.01618.38
8.3.320.0110.00918.51
8.3.310.0050.00418.39
8.3.300.0140.01020.70
8.3.290.0130.01020.65
8.3.280.0100.01018.45
8.3.270.0120.00716.61
8.3.260.0140.00616.38
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.320.0100.00618.02
8.2.310.0110.00918.07
8.2.300.0120.00820.43
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
8.1.340.0110.00820.15

preferences:
53.63 ms | 892 KiB | 5 Q