3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkEmail($email) { return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email); } function checkEmail2($email) { return (bool)preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $email); } if (function_exists('eregi')){ echo "eregi:\n"; var_dump(checkEmail("jim@example.com")); var_dump(checkEmail("jim@example.comm")); } echo "preg_match:\n"; var_dump(checkEmail2("jim@example.com")); var_dump(checkEmail2("jim@example.comm"));

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.0120.00618.35
8.3.50.0140.00718.29
8.3.40.0140.00418.74
8.3.30.0070.00718.88
8.3.20.0040.00419.21
8.3.10.0030.00622.02
8.3.00.0040.00420.43
8.2.180.0090.00618.66
8.2.170.0090.00922.96
8.2.160.0030.01122.11
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00419.95
8.2.110.0130.00020.53
8.2.100.0040.00718.09
8.2.90.0040.00417.63
8.2.80.0040.00417.97
8.2.70.0030.00517.93
8.2.60.0000.00918.22
8.2.50.0000.00918.10
8.2.40.0040.00419.34
8.2.30.0040.00419.11
8.2.20.0030.00517.90
8.2.10.0080.00018.13
8.2.00.0080.00017.75
8.1.270.0000.00724.01
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0060.00323.70
8.1.230.0060.00618.82
8.1.220.0040.00417.74
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0030.00618.10
8.1.170.0080.00018.77
8.1.160.0000.00918.85
8.1.150.0070.00018.84
8.1.140.0050.00322.04
8.1.130.0040.00420.33
8.1.120.0030.00317.45
8.1.110.0000.00717.45
8.1.100.0040.00417.54
8.1.90.0050.00317.56
8.1.80.0070.00017.59
8.1.70.0000.00717.59
8.1.60.0040.00417.69
8.1.50.0000.00817.45
8.1.40.0050.00317.64
8.1.30.0120.00017.64
8.1.20.0000.00817.77
8.1.10.0000.00817.66
8.1.00.0050.00317.59
8.0.300.0000.00818.77
8.0.290.0000.00816.75
8.0.280.0030.00318.29
8.0.270.0000.00717.27
8.0.260.0000.00718.50
8.0.250.0000.00716.92
8.0.240.0000.00817.06
8.0.230.0020.00516.93
8.0.220.0080.00316.85
8.0.210.0030.00616.86
8.0.200.0030.00316.93
8.0.190.0000.00717.07
8.0.180.0000.00816.91
8.0.170.0000.01016.99
8.0.160.0040.00416.99
8.0.150.0030.00716.86
8.0.140.0040.00416.82
8.0.130.0030.00313.44
8.0.120.0040.00417.00
8.0.110.0050.00316.93
8.0.100.0070.00017.04
8.0.90.0000.00716.87
8.0.80.0050.01616.94
8.0.70.0070.00017.04
8.0.60.0040.00416.96
8.0.50.0040.00416.96
8.0.30.0110.01117.01
8.0.20.0100.01017.40
8.0.10.0050.00217.05
8.0.00.0100.01016.88
7.4.330.0020.00215.55
7.4.320.0060.00016.67
7.4.300.0060.00016.62
7.4.290.0000.00716.70
7.4.280.0080.00016.66
7.4.270.0030.00316.64
7.4.260.0030.00316.68
7.4.250.0070.00016.76
7.4.240.0070.00016.68
7.4.230.0030.00316.83
7.4.220.0050.00316.73
7.4.210.0070.00816.78
7.4.200.0030.00316.56
7.4.160.0080.00916.67
7.4.140.0120.00917.86
7.4.130.0070.01016.81
7.4.120.0080.01016.63
7.4.110.0150.00616.81
7.4.100.0180.00016.56
7.4.90.0040.01416.64
7.4.80.0100.00619.39
7.4.70.0070.01016.35
7.4.60.0070.01416.61
7.4.50.0070.00716.39
7.4.40.0090.01216.47
7.4.00.0090.00314.71
7.3.330.0000.00513.39
7.3.320.0030.00313.46
7.3.310.0060.00316.48
7.3.300.0070.00016.36
7.3.290.0070.00016.24
7.3.280.0080.00816.35
7.3.260.0080.01116.52
7.3.240.0080.00916.61
7.3.230.0140.00616.42
7.3.210.0060.01216.60
7.3.200.0100.00616.64
7.3.190.0080.00816.43
7.3.180.0090.00916.38
7.3.170.0070.01016.68
7.3.160.0000.01616.70
7.2.330.0100.00716.73
7.2.320.0030.01516.54
7.2.310.0030.01416.65
7.2.300.0040.01916.70
7.2.290.0070.01416.59
7.2.110.0330.01014.76
7.2.100.0220.00914.68
7.2.90.0460.00715.00
7.2.80.0260.01014.91
7.2.70.0240.00715.00
7.2.60.0350.01315.30
7.2.50.0100.00715.10
7.2.40.0240.00615.07
7.2.30.0230.01314.88
7.2.20.0300.00714.90
7.2.10.0450.00315.17
7.2.00.0400.00715.24
7.1.230.0290.00713.98
7.1.220.1320.00314.05
7.1.210.0400.00513.87
7.1.200.0460.01214.06
7.1.190.0330.00314.01
7.1.180.0240.00313.98
7.1.170.0190.01214.22
7.1.160.0370.01014.13
7.1.150.0230.00813.94
7.1.140.0240.00614.13
7.1.130.0260.00314.03
7.1.120.1380.00014.02
7.1.110.0360.00314.07
7.1.100.0430.00513.86
7.1.90.0310.01013.95
7.1.80.0250.00613.91
7.1.70.0420.01014.17
7.1.60.0360.01332.10
7.1.50.0580.00632.02
7.1.40.0420.01032.11
7.1.30.0580.00632.02
7.1.20.0470.00632.24
7.1.10.0280.00914.04
7.1.00.0260.00413.97
5.6.380.0060.00914.45

preferences:
56.98 ms | 400 KiB | 5 Q