3v4l.org

run code in 300+ PHP versions simultaneously
<?php // EDIT THE 2 LINES BELOW AS D $email_to = "abc18712@gmail.com"; $email_subject = "Hi from John 2"; $email_from = "Jon Lottern <john@rgwtgtwhgt.com>"; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message = "Hi there\n\n"; $email_message .= "Thought about this\n"; $email_message .= "Cheers\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); print "sent";

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.0.30.0200.01416.91
8.0.20.0270.00716.88
8.0.10.0350.00317.10
8.0.00.0200.01217.04
7.4.160.0570.00616.43
7.4.150.0260.00816.39
7.4.140.0230.00616.36
7.4.130.0250.00616.40
7.4.120.0350.00816.18
7.4.110.0140.01816.44
7.4.100.0270.00516.46
7.4.90.0180.01316.30
7.4.80.0240.01216.38
7.4.70.0240.00616.48
7.4.60.0220.00916.32
7.4.50.0240.01016.41
7.4.40.0250.00916.21
7.4.30.0180.01416.43
7.4.20.0360.00816.30
7.4.10.0350.01316.37
7.4.00.0260.00816.45
7.3.280.0000.01516.34
7.3.270.0290.00716.34
7.3.260.0220.00716.41
7.3.250.0690.00716.33
7.3.240.0220.00816.31
7.3.230.0150.00816.37
7.3.220.0300.00716.29
7.3.210.0390.00916.29
7.3.200.0220.00716.32
7.3.190.0200.01516.22
7.3.180.0260.00816.26
7.3.170.0250.00516.29
7.3.160.0250.00816.30
7.3.150.0280.00216.29
7.3.140.0220.00916.24
7.3.130.0230.01016.20
7.3.120.0230.01016.25
7.3.110.0230.00716.16
7.3.100.0210.01216.14
7.3.90.0220.01216.56
7.3.80.0340.01516.34
7.3.70.0180.01116.21
7.3.60.0140.01416.36
7.3.50.0210.00816.38
7.3.40.0140.01416.39
7.3.30.0220.00916.37
7.3.20.0310.00916.43
7.3.10.0290.01516.39
7.3.00.0190.01616.32

preferences:
28.57 ms | 401 KiB | 5 Q