3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php set_include_path("include_path", "C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\PEAR"); include("Mail.php"); /* mail setup recipients, subject etc */ $recipients = "data.flame@gmail.com"; $headers["From"] = "info@chimpeon.com"; $headers["To"] = "data.flame@gmail.com"; $headers["Subject"] = "User feedback"; $mailmsg = "Hello, This is a test."; /* SMTP server name, port, user/passwd */ $smtpinfo["host"] = "localhost"; $smtpinfo["port"] = "25"; $smtpinfo["auth"] = true; $smtpinfo["username"] = "info@chimpeon.com"; $smtpinfo["password"] = "8eat5hitDown642"; /* Create the mail object using the Mail::factory method */ $mail_object =& Mail::factory("smtp", $smtpinfo); /* Ok send mail */ $mail_object->send($recipients, $headers, $mailmsg); ?>
Output for 7.0.0 - 7.2.0
Warning: set_include_path() expects exactly 1 parameter, 2 given in /in/AUblq on line 2 Warning: include(Mail.php): failed to open stream: No such file or directory in /in/AUblq on line 3 Warning: include(): Failed opening 'Mail.php' for inclusion (include_path='.:') in /in/AUblq on line 3 Fatal error: Uncaught Error: Class 'Mail' not found in /in/AUblq:17 Stack trace: #0 {main} thrown in /in/AUblq on line 17
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Warning: set_include_path() expects exactly 1 parameter, 2 given in /in/AUblq on line 2 Warning: include(Mail.php): failed to open stream: No such file or directory in /in/AUblq on line 3 Warning: include(): Failed opening 'Mail.php' for inclusion (include_path='.:') in /in/AUblq on line 3 Fatal error: Class 'Mail' not found in /in/AUblq on line 17
Process exited with code 255.