3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $envelope["from"]= "joe@example.com"; $envelope["to"] = "foo@example.com"; $envelope["cc"] = "bar@example.com"; $part1["type"] = TYPEMULTIPART; $part1["subtype"] = "mixed"; $contents = "sdfqsdfqsdfqsdf"; $part2["type"] = TYPEAPPLICATION; $part2["encoding"] = ENCBINARY; $part2["subtype"] = "octet-stream"; $part2["description"] = basename($filename); $part2["contents.data"] = $contents; $part3["type"] = TYPETEXT; $part3["subtype"] = "plain"; $part3["description"] = "description3"; $part3["contents.data"] = "contents.data3\n\n\n\t"; $body[1] = $part1; $body[2] = $part2; $body[3] = $part3; echo nl2br(imap_mail_compose($envelope, $body)); ?>
Output for 7.0.0 - 7.1.0
Notice: Use of undefined constant TYPEMULTIPART - assumed 'TYPEMULTIPART' in /in/B5HOJ on line 6 Notice: Use of undefined constant TYPEAPPLICATION - assumed 'TYPEAPPLICATION' in /in/B5HOJ on line 11 Notice: Use of undefined constant ENCBINARY - assumed 'ENCBINARY' in /in/B5HOJ on line 12 Notice: Undefined variable: filename in /in/B5HOJ on line 14 Notice: Use of undefined constant TYPETEXT - assumed 'TYPETEXT' in /in/B5HOJ on line 17 Fatal error: Uncaught Error: Call to undefined function imap_mail_compose() in /in/B5HOJ:26 Stack trace: #0 {main} thrown in /in/B5HOJ on line 26
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: filename in /in/B5HOJ on line 14 Fatal error: Call to undefined function imap_mail_compose() in /in/B5HOJ on line 26
Process exited with code 255.
Output for 5.0.4 - 5.6.28
Notice: Use of undefined constant TYPEMULTIPART - assumed 'TYPEMULTIPART' in /in/B5HOJ on line 6 Notice: Use of undefined constant TYPEAPPLICATION - assumed 'TYPEAPPLICATION' in /in/B5HOJ on line 11 Notice: Use of undefined constant ENCBINARY - assumed 'ENCBINARY' in /in/B5HOJ on line 12 Notice: Undefined variable: filename in /in/B5HOJ on line 14 Notice: Use of undefined constant TYPETEXT - assumed 'TYPETEXT' in /in/B5HOJ on line 17 Fatal error: Call to undefined function imap_mail_compose() in /in/B5HOJ on line 26
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Use of undefined constant TYPEMULTIPART - assumed 'TYPEMULTIPART' in /in/B5HOJ on line 6 Notice: Use of undefined constant TYPEAPPLICATION - assumed 'TYPEAPPLICATION' in /in/B5HOJ on line 11 Notice: Use of undefined constant ENCBINARY - assumed 'ENCBINARY' in /in/B5HOJ on line 12 Notice: Undefined variable: filename in /in/B5HOJ on line 14 Notice: Use of undefined constant TYPETEXT - assumed 'TYPETEXT' in /in/B5HOJ on line 17 Fatal error: Call to undefined function imap_mail_compose() in /in/B5HOJ on line 26
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Use of undefined constant TYPEMULTIPART - assumed 'TYPEMULTIPART' in /in/B5HOJ on line 6 Notice: Use of undefined constant TYPEAPPLICATION - assumed 'TYPEAPPLICATION' in /in/B5HOJ on line 11 Notice: Use of undefined constant ENCBINARY - assumed 'ENCBINARY' in /in/B5HOJ on line 12 Notice: Undefined variable: filename in /in/B5HOJ on line 14 Notice: Use of undefined constant TYPETEXT - assumed 'TYPETEXT' in /in/B5HOJ on line 17 Fatal error: Call to undefined function: imap_mail_compose() in /in/B5HOJ on line 26
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Use of undefined constant TYPEMULTIPART - assumed 'TYPEMULTIPART' in /in/B5HOJ on line 6 Notice: Use of undefined constant TYPEAPPLICATION - assumed 'TYPEAPPLICATION' in /in/B5HOJ on line 11 Notice: Use of undefined constant ENCBINARY - assumed 'ENCBINARY' in /in/B5HOJ on line 12 Notice: Undefined variable: filename in /in/B5HOJ on line 14 Notice: Use of undefined constant TYPETEXT - assumed 'TYPETEXT' in /in/B5HOJ on line 17 Fatal error: Call to undefined function: imap_mail_compose() in /in/B5HOJ on line 26
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant TYPEMULTIPART - assumed 'TYPEMULTIPART' in /in/B5HOJ on line 6 Notice: Use of undefined constant TYPEAPPLICATION - assumed 'TYPEAPPLICATION' in /in/B5HOJ on line 11 Notice: Use of undefined constant ENCBINARY - assumed 'ENCBINARY' in /in/B5HOJ on line 12 Notice: Undefined variable: filename in /in/B5HOJ on line 14 Notice: Use of undefined constant TYPETEXT - assumed 'TYPETEXT' in /in/B5HOJ on line 17 Fatal error: Call to undefined function: imap_mail_compose() in /in/B5HOJ on line 26