3v4l.org

run code in 300+ PHP versions simultaneously
<?php / display form if user has not clicked submit if (!isset($_POST["submit"])) { ?> <form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>"> From: <input type="text" name="from"><br> Subject: <input type="text" name="subject"><br> Message: <textarea rows="10" cols="40" name="message"></textarea><br> <input type="submit" name="submit" value="Submit Feedback"> </form> <?php } else // the user has submitted the form { // Check if the "from" input field is filled out if (isset($_POST["from"])) { $from = $_POST["from"]; // sender $subject = $_POST["subject"]; $message = $_POST["message"]; // message lines should not exceed 70 characters (PHP rule), so wrap it $message = wordwrap($message, 70); // send mail mail("webmaster@example.com",$subject,$message,"From: $from\n"); echo "Thank you for sending us feedback"; } }

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.270.0170.05318.76
5.4.260.0100.06318.94
5.4.250.0130.06019.09
5.4.240.0100.05318.78
5.4.230.0070.05718.94
5.4.220.0070.07718.80
5.4.210.0130.06318.83
5.4.200.0130.07019.00
5.4.190.0100.05718.93
5.4.180.0070.06018.96
5.4.170.0100.07718.98
5.4.160.0070.05318.97
5.4.150.0130.07718.94
5.4.140.0170.04316.55
5.4.130.0070.05716.38
5.4.120.0200.07016.41
5.4.110.0030.07316.36
5.4.100.0070.07316.48
5.4.90.0200.05716.52
5.4.80.0200.04316.63
5.4.70.0100.05716.46
5.4.60.0170.06016.54
5.4.50.0100.06716.48
5.4.40.0200.04316.59
5.4.30.0030.05316.33
5.4.20.0200.03716.48
5.4.10.0170.04716.36
5.4.00.0200.06015.87
5.3.280.0000.06314.47
5.3.270.0130.06014.46
5.3.260.0100.05314.30
5.3.250.0130.05714.62
5.3.240.0070.05314.30
5.3.230.0070.05714.62
5.3.220.0130.04314.48
5.3.210.0100.07014.61
5.3.200.0100.05014.72
5.3.190.0030.06714.45
5.3.180.0030.05714.68
5.3.170.0230.06014.44
5.3.160.0170.06314.58
5.3.150.0100.05314.61
5.3.140.0200.06314.55
5.3.130.0100.05314.55
5.3.120.0200.04314.64
5.3.110.0070.05314.55
5.3.100.0130.05013.81
5.3.90.0200.04314.07
5.3.80.0130.06013.95
5.3.70.0100.05014.02
5.3.60.0130.05714.02
5.3.50.0100.04713.87
5.3.40.0070.05013.96
5.3.30.0070.06313.93
5.3.20.0100.06313.39
5.3.10.0130.06013.66
5.3.00.0100.06713.34
5.2.170.0030.04711.15
5.2.160.0200.05310.93
5.2.150.0170.05011.15
5.2.140.0070.06010.90
5.2.130.0200.04011.11
5.2.120.0170.04011.20
5.2.110.0130.03311.19
5.2.100.0130.05011.25
5.2.90.0070.04011.19
5.2.80.0170.04010.98
5.2.70.0030.04711.24
5.2.60.0100.06011.16
5.2.50.0100.03311.04
5.2.40.0100.05311.15
5.2.30.0070.04711.13
5.2.20.0230.03010.89
5.2.10.0100.04710.94
5.2.00.0100.05010.56
5.1.60.0070.03710.04
5.1.50.0070.04710.04
5.1.40.0030.0439.90
5.1.30.0030.03710.41
5.1.20.0170.05010.24
5.1.10.0070.04710.30
5.1.00.0030.03710.12
5.0.50.0030.0308.59
5.0.40.0130.0308.19
5.0.30.0030.0478.07
5.0.20.0070.0308.15
5.0.10.0000.0338.26
5.0.00.0000.0608.30
4.4.90.0070.0276.44
4.4.80.0030.0236.44
4.4.70.0100.0236.44
4.4.60.0030.0306.44
4.4.50.0000.0236.44
4.4.40.0070.0336.44
4.4.30.0030.0206.44
4.4.20.0030.0306.45
4.4.10.0070.0306.45
4.4.00.0030.0336.45
4.3.110.0070.0276.45
4.3.100.0030.0206.45
4.3.90.0000.0236.45
4.3.80.0070.0436.45
4.3.70.0070.0176.45
4.3.60.0100.0106.45
4.3.50.0000.0236.45
4.3.40.0070.0406.45
4.3.30.0030.0206.45
4.3.20.0030.0306.45
4.3.10.0000.0236.45
4.3.00.0070.0276.11

preferences:
145.11 ms | 1394 KiB | 7 Q