3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $fields = array( 'np.title `partner`', 'fm.fmid', 'n.nid', 'ws.sid', 'n.language', ); $extra = array('adgroup', 'campaign', 'content', 'source', 'term', 'mobile', 'tablet'); foreach ($extra as $field) { $fields[] = "{$field}.`value` `{$field}`"; } $extra = array_combine($extra, $extra); $sql = 'INSERT INTO {report_generic_report} SELECT ' . implode(', ', $fields) . ", ws.submitted, ps.doi FROM {form_map_history{$suffix}} fmh JOIN {form_map} fm ON fmh.fmid = fm.fmid JOIN {node} np ON fm.vid = np.vid JOIN {webform_submissions{$suffix}} ws ON fmh.sid = ws.sid JOIN {partner_submission{$suffix}} ps ON ws.sid = ps.sid AND fm.vid = ps.vid JOIN {node} n ON ws.nid = n.nid"; foreach ($extra as $field) { $sql .= " LEFT JOIN {webform_submission_extra{$suffix}} `{$field}` ON ws.sid = `{$field}`.sid AND `{$field}`.`name` = '{$field}'"; } $sql .= " WHERE ws.submitted BETWEEN %d AND %d"; if ($form_state['values']['language']) { $sql .= " AND n.`language` = '".$form_state['values']['language']."'"; } $sql .= " ORDER BY `partner`, sid";
Output for 5.0.4 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: suffix in /in/vKLM3 on line 17 Notice: Undefined variable: suffix in /in/vKLM3 on line 17 Notice: Undefined variable: suffix in /in/vKLM3 on line 17 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: form_state in /in/vKLM3 on line 22
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: suffix in /in/vKLM3 on line 17 Notice: Undefined variable: suffix in /in/vKLM3 on line 17 Notice: Undefined variable: suffix in /in/vKLM3 on line 17 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: suffix in /in/vKLM3 on line 19 Notice: Undefined variable: form_state in /in/vKLM3 on line 22
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_combine() in /in/vKLM3 on line 15
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_combine() in /in/vKLM3 on line 15
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_combine() in /in/vKLM3 on line 15