3v4l.org

run code in 300+ PHP versions simultaneously
<?php $email = \"abc123@lolhaha\"; // Invalid email address //$email = \"somebody@somesite.com\"; // Valid email address // Set up regular expression strings to evaluate the value of email variable against $regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/'; // Run the preg_match() function on regex against the email address if (preg_match($regex, $email)) { echo $email . \" is a valid email. We can accept it.\"; } else { echo $email . \" is an invalid email. Please try again.\"; }

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)
5.4.240.0100.05018.78
5.4.230.0100.05318.74
5.4.220.0100.05019.09
5.4.210.0070.05718.65
5.4.200.0000.06019.09
5.4.190.0000.05718.98
5.4.180.0030.05318.64
5.4.170.0100.05319.09
5.4.160.0000.08018.77
5.4.150.0030.05718.75
5.4.140.0100.04716.37
5.4.130.0100.04316.38
5.4.120.0000.05716.58
5.4.110.0100.04716.41
5.4.100.0130.04316.46
5.4.90.0030.05016.48
5.4.80.0130.04716.37
5.4.70.0070.05316.40
5.4.60.0070.04716.36
5.4.50.0070.04316.59
5.4.40.0100.04316.36
5.4.30.0070.04716.37
5.4.20.0070.05016.52
5.4.10.0030.05316.52
5.4.00.0070.04716.04
5.3.280.0030.05714.47
5.3.270.0030.05314.38
5.3.260.0100.05714.38
5.3.250.0130.06014.60
5.3.240.0100.06714.62
5.3.230.0070.04714.47
5.3.220.0030.05014.42
5.3.210.0000.05714.57
5.3.200.0100.04314.61
5.3.190.0030.05314.66
5.3.180.0130.04014.61
5.3.170.0030.05314.65
5.3.160.0070.05014.43
5.3.150.0100.04314.26
5.3.140.0130.04314.33
5.3.130.0070.05014.45
5.3.120.0130.04714.41
5.3.110.0030.05314.43
5.3.100.0130.04314.03
5.3.90.0030.05014.03
5.3.80.0100.04314.17
5.3.70.0130.04013.89
5.3.60.0100.04714.10
5.3.50.0070.05014.04
5.3.40.0100.04313.95
5.3.30.0030.05013.79
5.3.20.0130.04313.56
5.3.10.0070.04713.66
5.3.00.0030.05013.65

preferences:
140.09 ms | 1386 KiB | 7 Q