3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Define some constants define( "RECIPIENT_NAME", "Kitchen Interiors" ); define( "RECIPIENT_EMAIL", "info@kitcheninteriors.ca" ); define( "EMAIL_SUBJECT", "Kitchen Interiors - Visitor Message" ); // Read the form values $success = false; $senderName = isset( $_POST['senderName'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['senderName'] ) : ""; $senderEmail = isset( $_POST['senderEmail'] ) ? preg_replace( "/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['senderEmail'] ) : ""; $message = isset( $_POST['message'] ) ? preg_replace( "/(From:|To:|BCC:|CC:|Subject:|Content-Type:)/", "", $_POST['message'] ) : ""; $messagecontent = "\r\n Name:" . $senderName . "\r\n Email:" . $senderEmail . "\r\n Message:" . $message; $SpamErrorMessage = "No Websites URLs permitted"; if(preg_match("/http/i", "$senderName")) {echo "$SpamErrorMessage"; exit();} if(preg_match("/http/i", "$senderEmail")) {echo "$SpamErrorMessage"; exit();} if(preg_match("/http/i", "$message")) {echo "$SpamErrorMessage"; exit();} $recipient = RECIPIENT_NAME . " <" . RECIPIENT_EMAIL . ">"; $headers = "From: " . $senderName . " <" . $senderEmail . ">"; $success = mail( $recipient, EMAIL_SUBJECT, $messagecontent, $headers ); ?> <html> <head> <title>Thank You</title> </head> <body style="background-color:#1b1b1b;"> <div style="margin-left:auto; margin-right:auto; margin-top:200px; text-align:center; color:#fff !important; font-size:24px; line-height:30px; font-weight:bold; font-family:Arial;"> <?php if ( $success ) echo "<p>Thanks for sending your message! We'll get back to you shortly.</p>" ?> <?php if ( !$success ) echo "<p>There was a problem sending your message. Please try again.</p>" ?> <p>Click your browser's Back button to return to the page.</p> </div> </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.60.0080.00816.88
8.3.50.0150.00016.55
8.3.40.0120.00919.04
8.3.30.0150.00418.94
8.3.20.0000.00820.29
8.3.10.0040.00421.89
8.3.00.0040.00417.97
8.2.180.0070.00716.97
8.2.170.0120.00422.96
8.2.160.0070.00720.24
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00421.08
8.2.120.0000.00726.35
8.2.110.0000.00920.52
8.2.100.0110.00018.16
8.2.90.0040.00419.17
8.2.80.0000.00817.97
8.2.70.0080.00017.88
8.2.60.0040.00418.05
8.2.50.0040.00418.10
8.2.40.0040.00422.05
8.2.30.0030.00521.18
8.2.20.0000.00718.36
8.2.10.0000.00818.17
8.2.00.0040.00418.24
8.1.280.0140.00325.92
8.1.270.0030.00622.25
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.81
8.1.230.0060.00619.04
8.1.220.0030.00517.76
8.1.210.0090.00018.77
8.1.200.0040.00417.60
8.1.190.0000.00817.47
8.1.180.0000.00818.10
8.1.170.0060.00318.70
8.1.160.0000.00719.11
8.1.150.0000.00818.99
8.1.140.0040.00419.70
8.1.130.0070.00018.92
8.1.120.0020.00517.68
8.1.110.0000.00717.66
8.1.100.0000.00717.62
8.1.90.0000.00817.63
8.1.80.0040.00417.64
8.1.70.0030.00317.64
8.1.60.0030.00617.76
8.1.50.0000.00717.72
8.1.40.0030.00517.64
8.1.30.0080.00017.72
8.1.20.0080.00017.76
8.1.10.0050.00317.63
8.1.00.0000.00717.71
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0000.00718.54
8.0.270.0090.00017.29
8.0.260.0060.00016.96
8.0.250.0030.00317.10
8.0.240.0000.00817.08
8.0.230.0070.00017.11
8.0.220.0000.00717.14
8.0.210.0070.00017.08
8.0.200.0000.00617.19
8.0.190.0030.00617.20
8.0.180.0050.00217.14
8.0.170.0000.00717.06
8.0.160.0050.00317.15
8.0.150.0070.00017.04
8.0.140.0040.00416.95
8.0.130.0030.00313.64
8.0.120.0000.00916.98
8.0.110.0040.00417.24
8.0.100.0000.00817.17
8.0.90.0000.00717.16
8.0.80.0030.01417.16
8.0.70.0000.00817.16
8.0.60.0030.00517.13
8.0.50.0080.00016.92
8.0.30.0080.01017.29
8.0.20.0130.00817.46
8.0.10.0040.00417.09
8.0.00.0150.00917.20
7.4.330.0050.00015.55
7.4.320.0030.00316.75
7.4.300.0000.00716.74
7.4.290.0060.00316.82
7.4.280.0060.00316.77
7.4.270.0000.00816.88
7.4.260.0030.00616.82
7.4.250.0070.00016.79
7.4.240.0000.00716.77
7.4.230.0030.00316.58
7.4.220.0070.01116.83
7.4.210.0030.01616.77
7.4.200.0000.00716.50
7.4.160.0120.00416.78
7.4.150.0100.00717.40
7.4.140.0080.01217.86
7.4.130.0120.01116.68
7.4.120.0080.01116.83
7.4.110.0110.00516.79
7.4.100.0230.00016.76
7.4.90.0120.00616.70
7.4.80.0070.01719.39
7.4.70.0070.01016.99
7.4.60.0160.00316.74
7.4.50.0100.00716.57
7.4.40.0070.01016.97
7.4.30.0170.00016.82
7.4.00.0020.01515.28
7.3.330.0000.00613.40
7.3.320.0000.00513.48
7.3.310.0070.00016.65
7.3.300.0000.00616.53
7.3.290.0090.00716.58
7.3.280.0110.00616.55
7.3.270.0060.01217.40
7.3.260.0120.00616.62
7.3.250.0120.00916.71
7.3.240.0110.00816.77
7.3.230.0100.01316.57
7.3.210.0160.00616.54
7.3.200.0030.01316.80
7.3.190.0130.00316.70
7.3.180.0060.01216.60
7.3.170.0070.01016.69
7.3.160.0030.01316.64
7.3.120.0070.01215.11
7.3.110.0080.01115.20
7.3.100.0070.00915.02
7.3.90.0060.00814.97
7.3.80.0030.00915.00
7.3.70.0100.00514.99
7.3.60.0080.00815.06
7.3.50.0120.00415.05
7.3.40.0040.01215.21
7.3.30.0090.00315.01
7.3.20.0090.00716.90
7.3.10.0100.00816.68
7.3.00.0130.00816.77
7.2.330.0130.00516.98
7.2.320.0060.01116.86
7.2.310.0100.00716.70
7.2.300.0090.00916.81
7.2.290.0090.00916.91
7.2.250.0070.01115.38
7.2.240.0080.00815.23
7.2.230.0060.00815.14
7.2.220.0050.00715.28
7.2.210.0090.00515.32
7.2.200.0070.01015.38
7.2.190.0070.00815.36
7.2.180.0030.00815.41
7.2.170.0050.01015.34
7.2.130.0170.00617.10
7.2.120.0130.01216.88
7.2.110.0190.01116.94
7.2.100.0140.00916.78
7.2.90.0150.01417.01
7.2.80.0110.00916.71
7.2.70.0280.00716.91
7.2.60.0200.00716.97
7.2.50.0130.01016.99
7.2.40.0220.00916.79
7.2.30.0120.01117.08
7.2.20.0150.00816.90
7.2.10.0170.00717.05
7.2.00.0090.00817.88
7.1.330.0030.00915.72
7.1.320.0040.00616.06
7.1.310.0040.00615.79
7.1.300.0110.00615.86
7.1.290.0060.00815.75
7.1.280.0050.01015.74
7.1.270.0030.01115.89
7.1.260.0060.00315.99
7.1.250.0080.01315.60
7.1.200.0100.00315.84
7.1.100.0000.01117.97
7.1.70.0060.00817.29
7.1.60.0220.01034.93
7.1.50.0150.01534.60
7.1.40.0220.00934.35
7.1.30.0230.01434.38
7.1.20.0270.01234.34
7.1.10.0080.00816.80
7.1.00.0090.00916.77
7.0.200.0050.01116.93
7.0.190.0030.01116.95
7.0.180.0030.01516.33
7.0.170.0060.00916.20
7.0.160.0060.01116.20
7.0.150.0090.00616.20
7.0.140.0030.01216.50
7.0.130.0070.01116.83
7.0.120.0030.01516.54
7.0.110.0090.00916.61
7.0.100.0030.01816.43
7.0.90.0050.01316.57
7.0.80.0030.01516.60
7.0.70.0050.01216.59
7.0.60.0070.00716.25
7.0.50.0060.01116.40
7.0.40.0070.00816.59
7.0.30.0030.01216.45
7.0.20.0000.01316.58
7.0.10.0000.01416.68
7.0.00.0130.00016.35

preferences:
62.16 ms | 400 KiB | 5 Q