3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // The message $message = "Line 1\r\nLine 2\r\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70, "\r\n"); // Send if(mail('mrtnzlml@gmail.com', 'XAMPP2 test', $message)) { echo 'OK'; } else { echo 'ERR'; } $error = error_get_last(); echo '<br> -> ' . $error;
Output for 5.4.43 - 7.1.0
Warning: mail() has been disabled for security reasons in /in/L5sbd on line 9 ERR Notice: Array to string conversion in /in/L5sbd on line 16 <br> -> Array
Output for 5.3.25 - 5.3.29, 5.4.16 - 5.4.42
ERR<br> -> sh: 1: /usr/bin/sendmail: not found
Output for 5.2.0 - 5.3.9, 5.3.11 - 5.3.24, 5.4.0 - 5.4.15
ERR<br> -> sh: 1: /usr/sbin/sendmail: not found
Output for 5.3.10
ERR<br> -> sh: 1: -t: not found
Output for 5.0.0 - 5.1.6
ERR Fatal error: Call to undefined function error_get_last() in /in/L5sbd on line 15 sh: 1: /usr/sbin/sendmail: not found
Process exited with code 255.
Output for 4.4.5 - 4.4.9
ERR Fatal error: Call to undefined function: error_get_last() in /in/L5sbd on line 15 sh: 1: /usr/sbin/sendmail: not found
Process exited with code 255.
Output for 4.3.2 - 4.4.4
ERR Fatal error: Call to undefined function: error_get_last() in /in/L5sbd on line 15 sh: 1: /usr/sbin/sendmail: not found
Process exited with code 255.
Output for 4.3.1
ERR Fatal error: Call to undefined function: error_get_last() in /in/L5sbd on line 15 sh: 1: /usr/sbin/sendmail: not found
Output for 4.3.0
Warning: mail() has been disabled for security reasons in /in/L5sbd on line 9 ERR Fatal error: Call to undefined function: error_get_last() in /in/L5sbd on line 15