3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //select all attachments $attachments_select="('".implode("', '", $VAR['add_attachments'])."')"; $q = "SELECT * FROM ".PRFX."TABLE_WORK_ORDER_ATTACHMENTS WHERE `WO_ID`=".$db->qstr($wo_id)." AND `ATTACHMENT_ID` IN $attachments_select ORDER BY `ATTACHMENT_ID` DESC"; if(!$rs = $db->execute($q)) { force_page('core', 'error&error_msg=MySQL Error: '.$db->ErrorMsg().'&menu=1&type=database'); exit; } $attachments = $rs->GetArray(); foreach($attachments as $a){ $file=$a['WO_ID']."_".$a['ATTACHMENT_NUMBER']."_".$a['ATTACHMENT_FILE']; $email->addAttachment(FILE_ROOT.'upload/message_store/'.$file, $file); }
based on YaJtr
Output for 7.0.5 - 7.1.0
Notice: Undefined variable: VAR in /in/ZjmcA on line 4 Warning: implode(): Invalid arguments passed in /in/ZjmcA on line 4 Notice: Use of undefined constant PRFX - assumed 'PRFX' in /in/ZjmcA on line 6 Notice: Undefined variable: db in /in/ZjmcA on line 6 Fatal error: Uncaught Error: Call to a member function qstr() on null in /in/ZjmcA:6 Stack trace: #0 {main} thrown in /in/ZjmcA on line 6
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: VAR in /in/ZjmcA on line 4 Warning: implode(): Invalid arguments passed in /in/ZjmcA on line 4 Notice: Use of undefined constant PRFX - assumed 'PRFX' in /in/ZjmcA on line 6 Notice: Undefined variable: db in /in/ZjmcA on line 6 Fatal error: Uncaught Error: Call to a member function qstr() on unknown in /in/ZjmcA:6 Stack trace: #0 {main} thrown in /in/ZjmcA on line 6
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined variable: VAR in /in/ZjmcA on line 4 Warning: Invalid operand type was used: implode() expects a container as one of the arguments in /in/ZjmcA on line 4 Notice: Use of undefined constant PRFX - assumed 'PRFX' in /in/ZjmcA on line 6 Notice: Undefined variable: db in /in/ZjmcA on line 6 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function qstr() on a non-object (null)' in /in/ZjmcA:6 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.8 - 5.6.28
Notice: Undefined variable: VAR in /in/ZjmcA on line 4 Warning: implode(): Invalid arguments passed in /in/ZjmcA on line 4 Notice: Use of undefined constant PRFX - assumed 'PRFX' in /in/ZjmcA on line 6 Notice: Undefined variable: db in /in/ZjmcA on line 6 Fatal error: Call to a member function qstr() on null in /in/ZjmcA on line 6
Process exited with code 255.
Output for 5.2.5 - 5.5.35
Notice: Undefined variable: VAR in /in/ZjmcA on line 4 Warning: implode(): Invalid arguments passed in /in/ZjmcA on line 4 Notice: Use of undefined constant PRFX - assumed 'PRFX' in /in/ZjmcA on line 6 Notice: Undefined variable: db in /in/ZjmcA on line 6 Fatal error: Call to a member function qstr() on a non-object in /in/ZjmcA on line 6
Process exited with code 255.
Output for 5.0.4 - 5.2.4
Notice: Undefined variable: VAR in /in/ZjmcA on line 4 Warning: implode(): Bad arguments. in /in/ZjmcA on line 4 Notice: Use of undefined constant PRFX - assumed 'PRFX' in /in/ZjmcA on line 6 Notice: Undefined variable: db in /in/ZjmcA on line 6 Fatal error: Call to a member function qstr() on a non-object in /in/ZjmcA on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: VAR in /in/ZjmcA on line 4 Warning: implode(): Bad arguments. in /in/ZjmcA on line 4 Notice: Use of undefined constant PRFX - assumed 'PRFX' in /in/ZjmcA on line 6 Notice: Undefined variable: db in /in/ZjmcA on line 6 Fatal error: Call to a member function qstr() on a non-object in /in/ZjmcA on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Notice: Undefined variable: VAR in /in/ZjmcA on line 4 Warning: implode(): Bad arguments. in /in/ZjmcA on line 4 Notice: Use of undefined constant PRFX - assumed 'PRFX' in /in/ZjmcA on line 6 Fatal error: Call to a member function on a non-object in /in/ZjmcA on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: VAR in /in/ZjmcA on line 4 Warning: implode() [http://www.php.net/function.implode]: Bad arguments. in /in/ZjmcA on line 4 Notice: Use of undefined constant PRFX - assumed 'PRFX' in /in/ZjmcA on line 6 Fatal error: Call to a member function on a non-object in /in/ZjmcA on line 6