3v4l.org

run code in 300+ PHP versions simultaneously
<?php $email = 'johnsnow123@ヒキワリ.ナットウ.fr'; $email = 'johnsnow123@foo.bar.zoosk.fr'; $localAndDomain = explode('@', $email); if (count($localAndDomain) !== 2) { echo 'invalid'; return; } $local = $localAndDomain[0]; $localExpression = '^[a-z0-9_-]+(?:[a-z0-9._%+-]+)*$'; if (mb_eregi($localExpression, $local) === false) { echo 'invalid'; return; } // Handle IDN domains $domain = $localAndDomain[1]; $domain = str_replace('xn--', '', idn_to_ascii($domain)); $dictionary = array('aero', 'arpa', 'asia', 'biz', 'cat', 'com', 'coop', 'edu', 'gov', 'info', 'int', 'jobs', 'mil', 'mobi', 'museum', 'name', 'net', 'org', 'pro', 'tel', 'travel'); $domainExpression = '^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+(?:[A-Z]{2}|' . implode('|', $dictionary) . ')$'; if (mb_eregi($domainExpression, $domain) === false) { echo 'invalid'; return; } echo 'valid';

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.60.0070.00717.38
8.3.50.0120.00822.48
8.3.40.0060.00919.50
8.3.30.0090.00619.82
8.3.20.0040.00421.13
8.3.10.0050.00324.41
8.3.00.0030.00620.00
8.2.180.0100.01019.05
8.2.170.0080.00822.96
8.2.160.0120.00321.13
8.2.150.0150.00024.18
8.2.140.0110.00424.66
8.2.130.0060.00326.16
8.2.120.0060.00321.20
8.2.110.0060.00923.09
8.2.100.0150.00020.51
8.2.90.0000.00820.16
8.2.80.0050.00318.38
8.2.70.0110.00418.25
8.2.60.0040.00418.79
8.2.50.0040.00418.25
8.2.40.0030.00818.91
8.2.30.0030.00519.08
8.2.20.0040.00418.63
8.2.10.0000.00818.79
8.2.00.0030.00618.53
8.1.280.0090.00625.92
8.1.270.0060.00324.71
8.1.260.0080.00026.35
8.1.250.0090.00628.09
8.1.240.0070.00324.52
8.1.230.0030.00919.76
8.1.220.0080.00018.54
8.1.210.0080.00018.77
8.1.200.0000.01017.98
8.1.190.0080.00017.88
8.1.180.0110.00019.64
8.1.170.0000.00819.39
8.1.160.0000.00822.86
8.1.150.0000.00819.55
8.1.140.0000.00818.34
8.1.130.0020.00518.53
8.1.120.0040.00418.29
8.1.110.0040.00418.18
8.1.100.0040.00418.37
8.1.90.0030.00518.36
8.1.80.0040.00418.21
8.1.70.0040.00418.29
8.1.60.0090.00018.45
8.1.50.0000.00918.34
8.1.40.0040.00418.28
8.1.30.0090.00318.52
8.1.20.0000.00818.38
8.1.10.0030.00718.41
8.1.00.0000.00818.35
8.0.300.0040.00418.77
8.0.290.0040.00417.91
8.0.280.0000.00719.25
8.0.270.0000.00818.00
8.0.260.0030.00318.21
8.0.250.0000.00917.65
8.0.240.0080.00317.79
8.0.230.0000.00817.69
8.0.220.0030.00517.65
8.0.210.0000.00917.54
8.0.200.0030.00517.63
8.0.190.0040.00417.79
8.0.180.0030.00617.71
8.0.170.0030.00617.86
8.0.160.0050.00317.72
8.0.150.0040.00417.73
8.0.140.0040.00417.77
8.0.130.0030.00313.46
8.0.120.0090.00017.55
8.0.110.0040.00417.63
8.0.100.0060.00517.56
8.0.90.0000.00817.64
8.0.80.0100.00717.90
8.0.70.0030.00617.63
8.0.60.0040.00417.64
8.0.50.0030.00617.81
8.0.30.0030.01617.91
8.0.20.0130.01017.82
8.0.10.0050.00317.86
8.0.00.0060.01617.74
7.4.330.0050.00015.17
7.4.320.0070.00017.50
7.4.300.0030.00317.46
7.4.290.0040.00417.34
7.4.280.0030.00517.44
7.4.270.0040.00417.45
7.4.260.0040.00417.43
7.4.250.0000.00817.42
7.4.240.0070.00117.41
7.4.230.0040.00417.23
7.4.220.0100.01017.43
7.4.210.0060.00917.44
7.4.200.0040.00417.45
7.4.190.0000.00717.56
7.4.160.0070.01017.38
7.4.150.0090.00917.40
7.4.140.0030.01617.86
7.4.130.0080.01017.34
7.4.120.0090.00917.32
7.4.110.0100.01317.24
7.4.100.0110.00817.35
7.4.90.0040.01417.29
7.4.80.0080.01119.39
7.4.70.0060.01717.38
7.4.60.0030.01517.23
7.4.50.0000.00717.19
7.4.40.0030.01317.44
7.4.30.0120.00417.38
7.4.00.0060.00915.61
7.3.330.0050.00013.20
7.3.320.0050.00013.21
7.3.310.0040.00417.08
7.3.300.0000.00717.28
7.3.290.0040.01317.11
7.3.280.0070.00817.09
7.3.270.0110.00617.40
7.3.260.0120.00617.22
7.3.250.0070.01117.19
7.3.240.0060.01217.07
7.3.230.0070.01117.28
7.3.210.0140.01117.10
7.3.200.0040.01919.39
7.3.190.0140.00917.24
7.3.180.0150.00317.23
7.3.170.0180.00017.24
7.3.160.0120.00617.27
7.3.120.0080.00515.55
7.3.10.0080.00817.05
7.3.00.0090.00617.57
7.2.330.0060.01317.59
7.2.320.0030.01417.39
7.2.310.0100.01417.54
7.2.300.0070.01017.15
7.2.290.0080.01217.31
7.2.130.0000.00917.55
7.2.120.0070.01117.62
7.2.110.0110.00317.65
7.2.100.0030.01317.29
7.2.90.0030.01317.42
7.2.80.0060.01117.36
7.2.70.0060.01217.45
7.2.60.0070.00817.47
7.2.50.0080.00817.49
7.2.40.0070.00717.33
7.2.30.0070.00717.46
7.2.20.0080.00817.61
7.2.10.0050.00517.55
7.2.00.0030.01018.90
7.1.250.0030.01316.89
7.1.200.0060.00916.55
7.1.100.0000.01219.05
7.1.70.0060.00618.07
7.1.60.0130.01319.46
7.1.50.0160.00917.95
7.1.00.0070.07323.18
7.0.200.0060.00317.81
7.0.140.0030.07722.80
7.0.60.0030.04020.77
7.0.50.0070.08317.91
7.0.40.0100.07020.87
7.0.30.0230.05020.78
7.0.20.0230.05720.94
7.0.10.0070.08720.93
7.0.00.0170.07320.73
5.6.280.0030.07321.60
5.6.210.0070.06721.45
5.6.200.0070.08718.09
5.6.190.0100.07021.14
5.6.180.0470.07321.19
5.6.170.0300.06721.23
5.6.160.0030.04321.08
5.6.150.0130.06718.21
5.6.140.0000.05018.18
5.6.130.0170.07318.23
5.6.120.0000.04321.73
5.6.110.0030.08321.66
5.6.100.0100.08321.63
5.6.90.0070.04021.78
5.6.80.0070.07321.28
5.5.350.4370.03721.28
5.5.340.0070.05317.91
5.5.330.0100.07020.82
5.5.320.0130.04320.79
5.5.310.0300.04020.75
5.5.300.0170.06017.98
5.5.290.0070.08318.00
5.5.280.0070.04021.31
5.5.270.0030.04721.52
5.5.260.0030.04021.60
5.5.250.0070.03721.40
5.5.240.0030.08020.87
5.4.450.0330.05720.08
5.4.440.0300.05719.68
5.4.430.0430.04719.76
5.4.420.0870.05019.95
5.4.410.0870.06319.71
5.4.400.0800.05319.44
5.4.390.1000.06319.33
5.4.380.0130.05319.26
5.4.370.0100.05719.04
5.4.360.0130.05019.18
5.4.350.0170.05018.98
5.4.340.0100.05719.22
5.4.320.0040.03912.47
5.4.310.0050.03812.46
5.4.300.0060.03712.47
5.4.290.0070.04112.46
5.4.280.0110.08612.36
5.4.270.0110.04312.36
5.4.260.0060.06412.36
5.4.250.0100.04012.36
5.4.240.0120.04412.36
5.4.230.0140.05312.35
5.4.220.0150.05212.36
5.4.210.0130.04712.36
5.4.200.0150.05612.35
5.4.190.0100.08312.35
5.4.180.0120.06612.35
5.4.170.0120.06912.36
5.4.160.0150.04512.36
5.4.150.0200.07412.36
5.4.140.0250.10212.04
5.4.130.0160.06612.03
5.4.120.0130.15411.98
5.4.110.0170.09711.98
5.4.100.0110.04111.98
5.4.90.0080.04911.98
5.4.80.0080.03911.98
5.4.70.0080.03711.97
5.4.60.0100.05611.98
5.4.50.0120.03611.97
5.4.40.0080.04011.96
5.4.30.0070.04811.96
5.4.20.0140.07211.96
5.4.10.0220.07211.96
5.4.00.0110.04311.45
5.3.290.0040.04012.80
5.3.280.0170.05812.71
5.3.270.0070.04312.73
5.3.260.0100.04212.72
5.3.250.0040.04212.72
5.3.240.0070.04912.72
5.3.230.0230.07812.70
5.3.220.0160.04412.68
5.3.210.0040.04812.68
5.3.200.0100.03612.68
5.3.190.0070.04512.68
5.3.180.0100.04312.67
5.3.170.0280.09612.67
5.3.160.0060.04212.67
5.3.150.0070.04912.67
5.3.140.0090.03812.66
5.3.130.0080.03912.65
5.3.120.0150.07812.66
5.3.110.0130.05112.66
5.3.100.0110.04312.12
5.3.90.0030.04312.08
5.3.80.0070.03912.08
5.3.70.0080.03812.07
5.3.60.0120.03712.07
5.3.50.0100.04712.00
5.3.40.0050.05612.00
5.3.30.0060.04111.96
5.3.20.0090.05011.75
5.3.10.0070.04311.71
5.3.00.0090.04011.69
5.2.170.0060.0469.20
5.2.160.0060.0299.20
5.2.150.0060.0309.20
5.2.140.0090.0319.20
5.2.130.0060.0479.15
5.2.120.0050.0379.15
5.2.110.0070.0289.16
5.2.100.0060.0329.16
5.2.90.0070.0319.16
5.2.80.0090.0339.15
5.2.70.0070.0339.15
5.2.60.0040.0449.10
5.2.50.0120.0479.08
5.2.40.0100.0439.05
5.2.30.0100.0399.03
5.2.20.0100.0489.01
5.2.10.0040.0408.93
5.2.00.0040.0368.80
5.1.60.0090.0238.08
5.1.50.0060.0318.07
5.1.40.0050.0318.06
5.1.30.0140.0338.41
5.1.20.0070.0288.43
5.1.10.0100.0418.16
5.1.00.0160.0498.15
5.0.50.0070.0286.64
5.0.40.0140.0446.50
5.0.30.0080.0536.30
5.0.20.0050.0366.28
5.0.10.0200.0836.26
5.0.00.0210.0746.25
4.4.90.0040.0184.78
4.4.80.0160.0464.75
4.4.70.0070.0164.76
4.4.60.0060.0154.76
4.4.50.0040.0174.77
4.4.40.0060.0244.71
4.4.30.0030.0184.76
4.4.20.0020.0204.85
4.4.10.0060.0164.84
4.4.00.0030.0264.76
4.3.110.0020.0184.67
4.3.100.0030.0164.66
4.3.90.0040.0154.64
4.3.80.0020.0264.59
4.3.70.0030.0154.63
4.3.60.0030.0154.63
4.3.50.0060.0154.63
4.3.40.0060.0244.54
4.3.30.0020.0233.30
4.3.20.0010.0183.27
4.3.10.0020.0183.23
4.3.00.0030.0276.89

preferences:
42.1 ms | 401 KiB | 5 Q