3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ( !isset( $_SESSION ) ) session_start(); if ( !$_POST ) exit; if ( !defined( "PHP_EOL" ) ) define( "PHP_EOL", "\r\n" ); /////////////////////////////////////////////////////////////////////////// // Simple Configuration Options // Enter the email address that you want to emails to be sent to. // Example $address = "joe.doe@yourdomain.com"; $address = "webmaster@tobaccoworld.de"; // END OF Simple Configuration Options /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // // Do not edit the following lines // /////////////////////////////////////////////////////////////////////////// $postValues = array(); foreach ( $_POST as $name => $value ) { $postValues[$name] = trim( $value ); } extract( $postValues ); // Important Variables $posted_verify = isset( $postValues['verify'] ) ? md5( $postValues['verify'] ) : ''; $session_verify = !empty($_SESSION['yoarts']['ajax-extended-form']['verify']) ? $_SESSION['yoarts']['ajax-extended-form']['verify'] : ''; $error = ''; /////////////////////////////////////////////////////////////////////////// // // Begin verification process // // You may add or edit lines in here. // // To make a field not required, simply delete the entire if statement for that field. // /////////////////////////////////////////////////////////////////////////// //////////////////////// // Subject field is required if ( empty( $subject ) ) { $error .= 'Your subject is required.'; } //////////////////////// //////////////////////// // Name field is required if ( empty( $name ) ) { $error .= 'Your name is required.'; } //////////////////////// //////////////////////// // Email field is required if ( empty( $email ) ) { $error .= 'Your e-mail address is required.'; } elseif ( !isEmail( $email ) ) { $error .= 'You have entered an invalid e-mail address.'; } //////////////////////// //////////////////////// // Comments field is required if ( empty( $message ) ) { $error .= 'You must enter a message to send.'; } //////////////////////// //////////////////////// // Verification code is required if ( $session_verify != $posted_verify ) { $error .= 'The verification code you entered is incorrect.'; } //////////////////////// if ( !empty($error) ) { echo '<div class="alert alert-danger">Oh snap! ' . $error . '</div>'; // Important to have return false in here. return false; } // Advanced Configuration Option. // i.e. The standard subject will appear as, "You've been contacted by John Doe." $e_subject = "Batman, wir haben eine neue Nachricht von: " . $name; // Advanced Configuration Option. // You can change this if you feel that you need to. // Developers, you may wish to add more fields to the form, in which case you must be sure to add them here. $msg = "Es gibt eine Nachricht von $name zum Thema $subject. Die Nachricht ist folgende:" . PHP_EOL . PHP_EOL; $msg .= $message . PHP_EOL . PHP_EOL; $msg .= "Wir können $name unter folgender E-Mail-Adresse antworten: $email." . PHP_EOL . PHP_EOL; $msg .= "-------------------------------------------------------------------------------------------" . PHP_EOL; $msg .= "Diese Nachricht wurde uns über das Kontaktformular der Website geschickt."; $msg = wordwrap( $msg, 70 ); $headers = "From: $email" . PHP_EOL; $headers .= "Reply-To: $email" . PHP_EOL; $headers .= "MIME-Version: 1.0" . PHP_EOL; $headers .= "Content-type: text/plain; charset=utf-8" . PHP_EOL; $headers .= "Content-Transfer-Encoding: quoted-printable" . PHP_EOL; if ( mail( $address, $e_subject, $msg, $headers ) ) { echo "<div class='alert alert-success'>Well done! Your message has been submitted to us.</div>"; // Important to have return false in here. return false; } /////////////////////////////////////////////////////////////////////////// // // Do not edit below this line // /////////////////////////////////////////////////////////////////////////// echo '<div class="alert alert-danger">Error! Please confirm PHP mail() is enabled.</div>'; return false; function isEmail( $email ) { // Email address verification, do not edit. return preg_match( "/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i", $email ); } ?>

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.0180.00316.63
8.3.50.0040.01116.13
8.3.40.0000.01518.92
8.3.30.0180.00418.70
8.3.20.0000.00821.88
8.3.10.0050.00323.69
8.3.00.0080.00017.92
8.2.180.0100.01018.13
8.2.170.0110.00422.96
8.2.160.0070.00720.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00420.65
8.2.120.0080.00026.35
8.2.110.0100.00019.33
8.2.100.0000.01217.91
8.2.90.0050.00317.88
8.2.80.0030.00518.79
8.2.70.0040.00418.05
8.2.60.0030.00518.16
8.2.50.0050.00319.34
8.2.40.0000.00821.25
8.2.30.0040.00419.32
8.2.20.0030.00518.13
8.2.10.0000.00718.08
8.2.00.0030.00618.13
8.1.280.0080.00625.92
8.1.270.0040.00420.38
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00620.74
8.1.230.0110.00021.01
8.1.220.0060.00317.80
8.1.210.0060.00318.77
8.1.200.0090.00317.35
8.1.190.0080.00017.22
8.1.180.0080.00018.10
8.1.170.0000.00818.71
8.1.160.0030.00619.08
8.1.150.0080.00020.61
8.1.140.0000.00819.55
8.1.130.0040.00420.69
8.1.120.0040.00417.36
8.1.110.0000.00817.44
8.1.100.0000.00817.40
8.1.90.0080.00017.45
8.1.80.0000.00717.33
8.1.70.0030.00317.34
8.1.60.0000.00817.62
8.1.50.0040.00417.41
8.1.40.0030.00517.45
8.1.30.0080.00017.60
8.1.20.0080.00017.54
8.1.10.0040.00417.47
8.1.00.0080.00017.31
8.0.300.0050.00318.77
8.0.290.0030.00516.59
8.0.280.0070.00018.48
8.0.270.0080.00317.26
8.0.260.0070.00018.87
8.0.250.0060.00317.02
8.0.240.0000.00716.86
8.0.230.0030.00316.89
8.0.220.0060.00316.91
8.0.210.0070.00016.83
8.0.200.0040.00416.87
8.0.190.0060.00316.99
8.0.180.0070.00016.95
8.0.170.0040.00416.99
8.0.160.0040.00416.95
8.0.150.0040.00416.89
8.0.140.0070.00016.80
8.0.130.0040.00413.34
8.0.120.0040.00416.91
8.0.110.0000.00717.00
8.0.100.0000.00816.82
8.0.90.0000.00716.81
8.0.80.0040.01116.96
8.0.70.0050.00216.80
8.0.60.0000.00716.86
8.0.50.0000.00716.82
8.0.30.0110.00616.96
8.0.20.0140.00517.40
8.0.10.0040.00417.13
8.0.00.0120.00616.74
7.4.330.0000.00515.55
7.4.320.0070.00016.48
7.4.300.0030.00316.50
7.4.290.0030.00316.39
7.4.280.0000.00716.58
7.4.270.0070.00016.51
7.4.260.0000.00716.57
7.4.250.0000.00916.54
7.4.240.0040.00416.64
7.4.230.0000.00716.39
7.4.220.0140.00816.61
7.4.210.0100.00316.61
7.4.200.0000.00816.38
7.4.160.0080.00816.58
7.4.150.0100.00717.40
7.4.140.0080.01217.86
7.4.130.0120.00616.63
7.4.120.0120.01016.47
7.4.110.0120.00616.38
7.4.100.0120.01116.64
7.4.90.0070.01016.51
7.4.80.0100.01019.39
7.4.70.0100.00716.55
7.4.60.0110.00516.33
7.4.50.0100.00616.41
7.4.40.0110.00716.39
7.4.30.0040.01216.55
7.4.00.0070.01114.79
7.3.330.0030.00313.20
7.3.320.0060.00013.08
7.3.310.0030.00316.32
7.3.300.0030.00316.23
7.3.290.0040.01116.28
7.3.280.0100.00816.27
7.3.270.0110.00717.40
7.3.260.0100.00816.36
7.3.250.0100.01216.38
7.3.240.0110.00816.49
7.3.230.0120.00816.56
7.3.210.0130.00616.30
7.3.200.0080.00816.44
7.3.190.0110.00716.30
7.3.180.0090.01616.45
7.3.170.0090.01316.44
7.3.160.0110.00516.62
7.3.120.0100.01014.90
7.3.110.0070.01114.76
7.3.100.0090.00614.89
7.3.90.0100.00014.82
7.3.80.0090.00014.82
7.3.70.0060.00314.88
7.3.60.0090.00614.80
7.3.50.0070.01114.75
7.3.40.0120.00414.78
7.3.30.0040.00814.99
7.3.20.0060.00916.65
7.3.10.0100.00716.71
7.3.00.0060.00616.61
7.2.330.0110.00616.48
7.2.320.0060.01416.50
7.2.310.0060.00916.55
7.2.300.0030.01416.80
7.2.290.0090.00616.53
7.2.250.0030.01715.07
7.2.240.0070.01115.05
7.2.230.0060.01314.90
7.2.220.0000.01015.12
7.2.210.0000.01015.11
7.2.200.0030.01015.28
7.2.190.0130.00315.01
7.2.180.0120.00614.75
7.2.170.0080.00415.05
7.2.60.0060.00816.77
7.2.50.0130.00316.82
7.1.330.0060.01015.82
7.1.320.0000.00815.62
7.1.310.0000.00815.79
7.1.300.0090.00615.91
7.1.290.0070.01015.51
7.1.280.0070.00715.84
7.1.270.0090.00315.71
7.1.260.0070.00715.68
7.1.200.0000.01415.70
7.1.70.0000.01117.12
7.1.60.0230.01034.91
7.1.50.0200.01034.62
7.1.40.0230.01334.18
7.1.30.0230.00734.35
7.1.20.0200.01334.59
7.1.10.0030.01016.48
7.1.00.0030.01316.72
7.0.200.0070.00716.40
7.0.190.0100.00316.34
7.0.180.0000.01716.34
7.0.170.0000.01316.21
7.0.160.0000.01316.05
7.0.150.0070.01016.12
7.0.140.0070.01016.31
7.0.130.0000.01316.59
7.0.120.0030.01016.68
7.0.110.0100.00316.30
7.0.100.0000.01716.30
7.0.90.0030.01316.48
7.0.80.0100.00716.22
7.0.70.0030.01316.20
7.0.60.0030.01316.09
7.0.50.0100.00316.45
7.0.40.0000.01716.48
7.0.30.0100.00016.38
7.0.20.0030.01316.27
7.0.10.0000.01316.54
7.0.00.0070.01016.33

preferences:
69.42 ms | 401 KiB | 5 Q