3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE HTML> <html> <head> </head> <body> <?php // define variables and set to empty values $name = $email = $gender = $comment = $website = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = test_input($_POST["name"]); $email = test_input($_POST["email"]); $website = test_input($_POST["website"]); $comment = test_input($_POST["comment"]); $gender = test_input($_POST["gender"]); } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?> <h2>PHP Form Validation Example</h2> <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> Name: <input type="text" name="name"> <br><br> E-mail: <input type="text" name="email"> <br><br> Website: <input type="text" name="website"> <br><br> Comment: <textarea name="comment" rows="5" cols="40"></textarea> <br><br> Gender: <input type="radio" name="gender" value="female">Female <input type="radio" name="gender" value="male">Male <br><br> <input type="submit" name="submit" value="Submit"> </form> <?php echo "<h2>Your Input:</h2>"; echo $name; echo "<br>"; echo $email; echo "<br>"; echo $website; echo "<br>"; echo $comment; echo "<br>"; echo $gender; ?> </body> </html>

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.70.0040.01216.75
8.3.60.0110.00318.68
8.3.50.0140.00422.10
8.3.40.0180.00018.94
8.3.30.0110.00418.98
8.3.20.0070.00020.20
8.3.10.0040.00423.48
8.3.00.0080.00019.38
8.2.180.0070.00716.75
8.2.170.0040.01122.96
8.2.160.0100.01019.41
8.2.150.0090.00025.66
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0070.01119.40
8.2.110.0080.00321.04
8.2.100.0120.00018.03
8.2.90.0000.00817.74
8.2.80.0040.00417.97
8.2.70.0000.00818.03
8.2.60.0040.00418.12
8.2.50.0030.00518.10
8.2.40.0060.00318.22
8.2.30.0030.00518.17
8.2.20.0040.00417.83
8.2.10.0080.00018.16
8.2.00.0040.00418.17
8.1.280.0110.00425.92
8.1.270.0000.00723.97
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0030.00717.64
8.1.230.0070.00317.82
8.1.220.0040.00417.78
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0030.00717.23
8.1.180.0000.00718.10
8.1.170.0040.00418.66
8.1.160.0000.00818.93
8.1.150.0040.00418.80
8.1.140.0040.00419.55
8.1.130.0000.00717.75
8.1.120.0000.00717.39
8.1.110.0000.00817.48
8.1.100.0030.00517.55
8.1.90.0040.00417.59
8.1.80.0050.00317.51
8.1.70.0030.00317.50
8.1.60.0050.00217.63
8.1.50.0030.00517.46
8.1.40.0080.00017.56
8.1.30.0000.00817.59
8.1.20.0000.00817.65
8.1.10.0030.00617.52
8.1.00.0050.00317.40
8.0.300.0000.00918.77
8.0.290.0000.00816.75
8.0.280.0030.00318.48
8.0.270.0030.00617.23
8.0.260.0030.00717.12
8.0.250.0000.00716.99
8.0.240.0030.00317.04
8.0.230.0000.00817.07
8.0.220.0040.00316.98
8.0.210.0070.00417.04
8.0.200.0030.00317.09
8.0.190.0080.00017.11
8.0.180.0000.00716.90
8.0.170.0040.00417.04
8.0.160.0030.00416.98
8.0.150.0000.00717.03
8.0.140.0080.00016.94
8.0.130.0050.00013.48
8.0.120.0030.00616.87
8.0.110.0000.00716.90
8.0.100.0040.00416.89
8.0.90.0070.00016.89
8.0.80.0090.00617.03
8.0.70.0040.00416.94
8.0.60.0000.00716.79
8.0.50.0040.00416.89
8.0.30.0080.01117.23
8.0.20.0100.00917.40
8.0.10.0050.00216.94
8.0.00.0140.01017.08
7.4.330.0060.00015.09
7.4.320.0000.00616.46
7.4.300.0030.00316.55
7.4.290.0030.00316.55
7.4.280.0040.00416.65
7.4.270.0040.00416.65
7.4.260.0070.00316.55
7.4.250.0030.00616.61
7.4.240.0030.00316.54
7.4.230.0030.00316.64
7.4.220.0100.01316.71
7.4.210.0070.01016.59
7.4.200.0040.00416.62
7.4.160.0030.01316.41
7.4.150.0170.01017.40
7.4.140.0080.01017.86
7.4.130.0060.01216.62
7.4.120.0090.00716.51
7.4.110.0160.00316.50
7.4.100.0130.00416.60
7.4.90.0110.00816.33
7.4.80.0060.01019.39
7.4.70.0100.01016.59
7.4.60.0000.01716.66
7.4.50.0000.01016.36
7.4.40.0060.01216.71
7.4.30.0040.01316.50
7.4.00.0060.00915.04
7.3.330.0050.00013.41
7.3.320.0000.00613.32
7.3.310.0070.00016.55
7.3.300.0000.00616.32
7.3.290.0100.00416.46
7.3.280.0080.00916.47
7.3.270.0110.00717.40
7.3.260.0100.00716.42
7.3.250.0110.00816.63
7.3.240.0100.00716.49
7.3.230.0030.01416.55
7.3.210.0100.01016.49
7.3.200.0180.00316.54
7.3.190.0030.01416.51
7.3.180.0090.01216.57
7.3.170.0060.01116.62
7.3.160.0070.01016.51
7.3.120.0060.01314.99
7.3.110.0090.00714.95
7.3.100.0090.00315.07
7.3.90.0060.01114.96
7.3.80.0050.01114.98
7.3.70.0050.00514.93
7.3.60.0090.00514.65
7.3.50.0040.00915.04
7.3.40.0050.01014.77
7.3.30.0080.00614.86
7.3.20.0040.00716.52
7.3.10.0050.00816.70
7.3.00.0030.00916.51
7.2.330.0070.01016.63
7.2.320.0070.01116.53
7.2.310.0160.00016.63
7.2.300.0090.01216.63
7.2.290.0100.01016.71
7.2.250.0090.00615.08
7.2.240.0080.00814.92
7.2.230.0050.01015.12
7.2.220.0040.00915.21
7.2.210.0090.00814.79
7.2.200.0020.01214.88
7.2.190.0090.00614.64
7.2.180.0100.00314.89
7.2.170.0070.00314.94
7.2.60.0000.00916.95
7.2.50.0000.01616.71
7.2.40.0090.00919.63
7.2.30.0110.01519.94
7.2.20.0100.01519.60
7.2.10.0090.01319.75
7.2.00.0100.01219.81
7.1.330.0040.00915.84
7.1.320.0040.00915.61
7.1.310.0040.01115.78
7.1.300.0060.00915.58
7.1.290.0030.00815.66
7.1.280.0030.01215.72
7.1.270.0060.00815.81
7.1.260.0060.00715.58
7.1.200.0000.01115.79
7.1.160.0110.00618.82
7.1.150.0110.01318.54
7.1.140.0080.01618.79
7.1.130.0090.01118.65
7.1.120.0050.01218.62
7.1.110.0070.00918.05
7.1.100.0370.01117.39
7.1.90.0560.00817.37
7.1.80.0620.01117.37
7.1.70.0600.01116.53
7.1.60.0740.01234.35
7.1.50.0790.01733.97
7.1.40.0360.01433.66
7.1.30.0350.01733.61
7.1.20.1000.01733.91
7.1.10.0130.01215.93
7.1.00.0400.01015.98
7.0.290.0160.00918.11
7.0.270.0090.01218.27
7.0.260.0120.00818.28
7.0.250.0120.00817.59
7.0.240.0420.01017.13
7.0.230.0670.01117.09
7.0.220.0620.01116.98
7.0.210.0670.00915.97
7.0.200.0610.00916.29
7.0.190.0660.00616.02
7.0.180.0190.01215.59
7.0.170.0380.00915.66
7.0.160.0690.01215.59
7.0.150.0170.01015.67
7.0.140.0260.01015.72
7.0.130.0470.01215.94
7.0.120.0550.01215.86
7.0.110.0350.01215.66
7.0.100.0360.00915.69
7.0.90.0430.00915.56
7.0.80.0340.01215.69
7.0.70.0740.01215.71
7.0.60.0740.00915.44
7.0.50.0690.01115.66
7.0.40.0770.01215.86
7.0.30.0820.01015.80
7.0.20.0770.01115.80
7.0.10.0700.01315.68
7.0.00.0760.01015.66
5.6.300.0200.06620.77
5.6.290.0150.06620.80
5.6.280.0130.06520.87
5.6.270.0160.06420.86
5.6.260.0150.06220.79
5.6.250.0130.06120.76
5.6.240.0150.06620.90
5.6.230.0180.06020.82
5.6.220.0170.06820.83
5.6.210.0170.07320.75
5.6.200.0190.07020.91
5.6.190.0170.06320.82
5.6.180.0190.06420.79
5.6.170.0180.05720.74
5.6.160.0200.06720.72
5.6.150.0160.07220.82
5.6.140.0270.06820.75
5.6.130.0170.07120.76
5.6.120.0210.06520.80
5.6.110.0250.06920.91
5.6.100.0210.06820.76
5.6.90.0160.06520.79
5.6.80.0170.06220.16
5.6.70.0170.06620.12
5.6.60.0150.05520.20
5.6.50.0160.05820.16
5.6.40.0110.05920.17
5.6.30.0210.05920.14
5.6.20.0200.06620.15
5.6.10.0170.05720.17
5.6.00.0190.06220.14
5.5.380.0110.06617.61
5.5.370.0110.05717.45
5.5.360.0120.06617.46
5.5.350.0170.06117.45
5.5.340.0170.06417.86
5.5.330.0140.06617.91
5.5.320.0140.06417.96
5.5.310.0150.06117.93
5.5.300.0190.07417.91
5.5.290.0200.06618.04
5.5.280.0170.06318.06
5.5.270.0180.06617.87
5.5.260.0130.05917.95
5.5.250.0130.05717.68
5.5.240.0160.06617.32
5.5.230.0160.06617.29
5.5.220.0140.06117.20
5.5.210.0140.06217.20
5.5.200.0150.05917.36
5.5.190.0180.06617.41
5.5.180.0140.06017.42
5.5.160.0160.06017.31
5.5.150.0130.06317.28
5.5.140.0110.06217.30
5.5.130.0090.06417.35
5.5.120.0120.06017.27
5.5.110.0160.05017.38
5.5.100.0100.05917.21
5.5.90.0130.05917.17
5.5.80.0140.05317.26
5.5.70.0100.06617.18
5.5.60.0170.05717.12
5.5.50.0130.05417.24
5.5.40.0160.05417.20
5.5.30.0120.06017.06
5.5.20.0110.05817.18
5.5.10.0140.05517.23
5.5.00.0160.05417.13

preferences:
67.01 ms | 401 KiB | 5 Q