3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE HTML> <html> <head> <style> .error {color: #FF0000;} </style> </head> <body> <?php // define variables and set to empty values $nameErr = $emailErr = $genderErr = $websiteErr = ""; $name = $email = $gender = $comment = $website = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["name"])) {$nameErr = "Name is required";} else { $name = test_input($_POST["name"]); // check if name only contains letters and whitespace if (!preg_match("/^[a-zA-Z ]*$/",$name)) { $nameErr = "Only letters and white space allowed"; } } if (empty($_POST["email"])) {$emailErr = "Email is required";} else {

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.0110.04012.35
5.4.230.0110.04112.34
5.4.220.0110.03912.34
5.4.210.0100.04112.34
5.4.200.0100.04212.34
5.4.190.0120.04012.34
5.4.180.0090.04412.34
5.4.170.0130.05412.35
5.4.160.0120.04112.34
5.4.150.0110.04112.34
5.4.140.0130.03812.03
5.4.130.0130.04012.01
5.4.120.0120.03911.97
5.4.110.0110.04111.97
5.4.100.0130.03911.97
5.4.90.0120.03911.97
5.4.80.0120.03911.97
5.4.70.0100.04011.97
5.4.60.0160.04911.97
5.4.50.0090.04211.96
5.4.40.0130.03511.95
5.4.30.0120.04111.95
5.4.20.0090.04311.94
5.4.10.0120.04511.95
5.4.00.0110.04511.44
5.3.280.0100.05012.71
5.3.270.0170.04512.72
5.3.260.0150.04712.72
5.3.250.0120.04812.72
5.3.240.0170.07212.72
5.3.230.0100.05012.71
5.3.220.0130.04712.68
5.3.210.0130.04912.68
5.3.200.0110.04912.68
5.3.190.0080.05212.68
5.3.180.0190.07012.67
5.3.170.0120.04612.67
5.3.160.0150.03912.67
5.3.150.0120.04212.67
5.3.140.0160.03512.66
5.3.130.0130.04212.66
5.3.120.0110.04612.66
5.3.110.0090.04412.66
5.3.100.0120.05412.12
5.3.90.0090.04312.08
5.3.80.0120.03912.07
5.3.70.0090.04212.08
5.3.60.0100.04212.06
5.3.50.0110.04112.00
5.3.40.0110.04112.00
5.3.30.0130.05211.95
5.3.20.0110.04111.71
5.3.10.0100.04011.68
5.3.00.0090.04111.67

preferences:
141.46 ms | 1394 KiB | 7 Q