3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkEmail($email) { $email = trim($email); if (filter_var($email, FILTER_VALIDATE_EMAIL) === false) { return false; } list($username, $domain) = explode("@", $email); if (getmxrr($domain, $mxHost)) { return true; } else { /* if (stripos(gethostbyaddr(gethostbyname($domain)), $domain) !== false) { return true; } */ if (checkdnsrr($domain, 'MX')) { return true; } // Is domain valid if (filter_var(gethostbyname($domain), FILTER_VALIDATE_IP)) { if (fsockopen($domain, 25, $errno, $errstr, 5)) { return true; } } } return false; } var_dump(checkEmail('kaidof@yahoo.com'));

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.70.0100.00618.91
8.3.60.0080.00817.37
8.3.50.0150.00621.54
8.3.40.0130.00619.46
8.3.30.0030.01219.34
8.3.20.0000.00822.54
8.3.10.0060.00321.28
8.3.00.0030.00623.97
8.2.190.0130.00320.92
8.2.180.0080.01219.16
8.2.170.0120.00322.96
8.2.160.0150.00019.70
8.2.150.0040.00424.18
8.2.140.0130.00724.66
8.2.130.0040.00421.68
8.2.120.0040.00426.35
8.2.110.0040.00722.74
8.2.100.0080.00418.43
8.2.90.0000.00818.33
8.2.80.0070.00317.99
8.2.70.0000.01418.30
8.2.60.0030.00618.30
8.2.50.0050.00518.10
8.2.40.0030.00619.77
8.2.30.0000.00819.57
8.2.20.0030.00618.35
8.2.10.0000.00818.48
8.2.00.0030.00618.18
8.1.280.0120.00625.92
8.1.270.0040.00423.99
8.1.260.0070.00326.35
8.1.250.0030.00628.09
8.1.240.0030.00724.27
8.1.230.0090.00319.54
8.1.220.0000.00918.02
8.1.210.0040.00418.77
8.1.200.0060.00317.63
8.1.190.0000.00917.85
8.1.180.0060.00318.10
8.1.170.0080.00019.12
8.1.160.0000.00822.39
8.1.150.0000.00819.11
8.1.140.0060.00319.88
8.1.130.0040.00417.94
8.1.120.0040.00417.93
8.1.110.0000.00817.86
8.1.100.0060.00317.76
8.1.90.0080.00017.84
8.1.80.0040.00417.75
8.1.70.0030.00617.91
8.1.60.0000.00818.04
8.1.50.0000.00918.04
8.1.40.0050.00317.87
8.1.30.0040.00418.00
8.1.20.0060.00317.91
8.1.10.0060.00318.00
8.1.00.0040.00719.85
8.0.300.0040.00418.77
8.0.290.0030.00517.08
8.0.280.0040.00418.71
8.0.270.0070.00017.43
8.0.260.0040.00417.71
8.0.250.0000.00717.25
8.0.240.0090.00017.26
8.0.230.0030.00517.15
8.0.220.0080.00317.23
8.0.210.0000.00817.23
8.0.200.0040.00417.33
8.0.190.0030.00517.36
8.0.180.0100.00017.25
8.0.170.0080.00017.21
8.0.160.0000.00817.21
8.0.150.0040.00417.30
8.0.140.0060.00317.30
8.0.130.0050.00513.82
8.0.120.0000.00917.34
8.0.110.0030.00717.33
8.0.100.0030.00617.46
8.0.90.0030.00517.18
8.0.80.0090.00917.32
8.0.70.0060.00317.35
8.0.60.0040.00417.37
8.0.50.0060.00317.18
8.0.30.0140.00817.45
8.0.20.0180.00717.48
8.0.10.0090.00017.43
8.0.00.0170.00317.34
7.4.330.0040.00415.21
7.4.320.0040.00417.08
7.4.300.0070.00017.17
7.4.290.0040.00416.99
7.4.280.0080.00017.09
7.4.270.0080.00017.08
7.4.260.0000.00817.21
7.4.250.0080.00017.20
7.4.240.0000.00817.15
7.4.230.0030.00617.25
7.4.220.0100.01017.14
7.4.210.0070.01117.05
7.4.200.0030.00517.26
7.4.160.0090.00817.14
7.4.150.0100.01017.40
7.4.140.0130.01617.86
7.4.130.0120.01017.05
7.4.120.0120.00817.01
7.4.110.0130.00717.18
7.4.100.0100.00917.18
7.4.90.0110.00817.02
7.4.80.0120.00819.39
7.4.70.0070.01117.18
7.4.60.0060.01217.17
7.4.50.0030.01617.19
7.4.40.0120.00616.90
7.4.30.0090.01817.09
7.4.00.0030.01515.56
7.3.330.0040.00413.58
7.3.320.0070.00013.77
7.3.310.0000.00816.78
7.3.300.0070.00016.70
7.3.290.0070.00816.84
7.3.280.0130.00816.86
7.3.270.0120.00817.40
7.3.260.0140.00917.05
7.3.250.0100.01016.95
7.3.240.0170.00616.91
7.3.230.0140.00716.96
7.3.210.0120.00616.84
7.3.200.0070.01116.78
7.3.190.0120.00916.83
7.3.180.0130.00616.65
7.3.170.0090.01216.96
7.3.160.0170.00716.95
7.3.10.0040.00716.92
7.3.00.0030.01316.94
7.2.330.0090.01017.26
7.2.320.0060.01217.21
7.2.310.0040.01816.91
7.2.300.0120.01217.29
7.2.290.0100.01617.09
7.2.130.0100.01017.23
7.2.120.0100.00317.23
7.2.110.0000.01217.20
7.2.100.0060.00617.20
7.2.90.0000.01217.45
7.2.80.0070.00717.21
7.2.70.0080.00417.40
7.2.60.0120.00217.38
7.2.50.0070.00717.30
7.2.40.0090.00617.23
7.2.30.0060.00617.12
7.2.20.0000.01317.24
7.2.10.0070.00416.96
7.2.00.0050.00918.74
7.1.250.0060.00615.88
7.1.200.0060.00616.37
7.1.70.0070.00717.82
7.1.60.0120.00317.95
7.1.00.0070.07722.79
7.0.200.0070.00715.16
7.0.110.0270.06020.80
7.0.100.0400.04320.68
7.0.90.0330.05320.71
7.0.80.0300.05320.79
7.0.70.0300.06020.88
7.0.60.0230.06720.75
7.0.50.0270.05720.86
7.0.40.0130.05320.77
7.0.30.0130.05320.71
7.0.20.0070.06020.71
7.0.10.0330.05320.78
7.0.00.0130.05320.92
5.6.260.0130.05021.41
5.6.250.0100.05721.30
5.6.240.0070.06021.47
5.6.230.0100.05721.27
5.6.220.0030.06021.19
5.6.210.0100.06021.32
5.6.200.0130.06721.29
5.6.190.0130.05321.21
5.6.180.0130.05321.27
5.6.170.0130.05721.40
5.6.160.0200.05021.33
5.6.150.0100.06021.24
5.6.140.0200.05721.34
5.6.130.0170.05021.24
5.6.120.0130.07021.40
5.6.110.0130.05721.39
5.6.100.0130.06021.39
5.6.90.0170.07721.22
5.6.80.0130.05720.80
5.6.70.0100.06020.79
5.6.60.0170.06020.63
5.6.50.0200.04720.80
5.6.40.0070.05720.85
5.6.30.0130.06320.63
5.6.20.0030.06020.69
5.6.10.0130.05020.69
5.6.00.0130.05320.73

preferences:
54.93 ms | 401 KiB | 5 Q