3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE> <html> <body> <?php $from = 'jjacobs@valdosta.edu'; $subject=$_POST['subject']; $text=$_POST['libnews']; if ((empty($subject) &&empty($text)) echo 'You forgot the email subject and body text.<br/>'; } if ((empty($subject) && (!empty($text) echo 'You forgot the email subject.<br/>'; } if ((empty($subject)) && empty($text) { echo 'You forgot the email body text.<br/>': } if ((empty($subject)) && (!empty($text)) { $dbc=mysqli_conntect('localhost', 'root', 'root', 'astwo_jacobs') error or die ('Error connection to MySQL server.'); $query = "SELECT * FROM email_list"; $result = mysqli_query($dbc, $query) or die('Error querying database.'); while ($row = mysqli_fetch_array($resu{)) $to = $row['email']; $first_name = $row['first_name']; $last_name = $row['last_name']; $msg = "Dear $first_name $last_name,\n$text"; mail($to, $subject, $msg, 'From:' . $from); echo 'Email sent to: ' . $to . '<br />'; } mysqli_close($dbc); ?> <p><a href= "http://localhost/asthree_sendemail.html>Back to the form</a></p> </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)
7.1.70.0240.01415.10
7.1.60.0340.01534.82
7.1.50.0270.02134.73
7.1.40.0500.01032.44
7.1.30.0260.01634.32
7.1.20.0270.00334.23
7.1.10.0180.01814.41
7.1.00.0260.01414.61
7.0.200.0330.00914.82
7.0.190.0000.02016.34
7.0.180.0300.01216.21
7.0.170.0120.00916.02
7.0.160.0060.01015.96
7.0.150.0070.01016.01
7.0.140.0100.01015.91
7.0.130.0060.01216.35
7.0.120.0030.01316.22
7.0.110.0100.01316.04
7.0.100.0310.01214.32
7.0.90.0070.01316.14
7.0.80.0120.00916.18
7.0.70.0050.01716.01
7.0.60.0090.01116.09
7.0.50.0100.01016.08
7.0.40.0130.01116.39
7.0.30.0000.01616.24
7.0.20.0100.01116.23
7.0.10.0100.00616.19
7.0.00.0050.01016.20

preferences:
137.69 ms | 1394 KiB | 7 Q