3v4l.org

run code in 300+ PHP versions simultaneously
<?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); $suffix = ''; $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"; print $sql;
Output for git.master, git.master_jit
Warning: Undefined variable $form_state in /in/VWlZ8 on line 24 Warning: Trying to access array offset on value of type null in /in/VWlZ8 on line 24 Warning: Trying to access array offset on value of type null in /in/VWlZ8 on line 24 INSERT INTO {report_generic_report} SELECT np.title `partner`, fm.fmid, n.nid, ws.sid, n.language, adgroup.`value` `adgroup`, campaign.`value` `campaign`, content.`value` `content`, source.`value` `source`, term.`value` `term`, mobile.`value` `mobile`, tablet.`value` `tablet`, ws.submitted, ps.doi FROM {form_map_history} fmh JOIN {form_map} fm ON fmh.fmid = fm.fmid JOIN {node} np ON fm.vid = np.vid JOIN {webform_submissions} ws ON fmh.sid = ws.sid JOIN {partner_submission} ps ON ws.sid = ps.sid AND fm.vid = ps.vid JOIN {node} n ON ws.nid = n.nid LEFT JOIN {webform_submission_extra} `adgroup` ON ws.sid = `adgroup`.sid AND `adgroup`.`name` = 'adgroup' LEFT JOIN {webform_submission_extra} `campaign` ON ws.sid = `campaign`.sid AND `campaign`.`name` = 'campaign' LEFT JOIN {webform_submission_extra} `content` ON ws.sid = `content`.sid AND `content`.`name` = 'content' LEFT JOIN {webform_submission_extra} `source` ON ws.sid = `source`.sid AND `source`.`name` = 'source' LEFT JOIN {webform_submission_extra} `term` ON ws.sid = `term`.sid AND `term`.`name` = 'term' LEFT JOIN {webform_submission_extra} `mobile` ON ws.sid = `mobile`.sid AND `mobile`.`name` = 'mobile' LEFT JOIN {webform_submission_extra} `tablet` ON ws.sid = `tablet`.sid AND `tablet`.`name` = 'tablet' WHERE ws.submitted BETWEEN %d AND %d ORDER BY `partner`, sid
Output for rfc.property-hooks
Warning: Undefined variable $form_state in /in/VWlZ8 on line 24 Warning: Trying to access array offset on null in /in/VWlZ8 on line 24 Warning: Trying to access array offset on null in /in/VWlZ8 on line 24 INSERT INTO {report_generic_report} SELECT np.title `partner`, fm.fmid, n.nid, ws.sid, n.language, adgroup.`value` `adgroup`, campaign.`value` `campaign`, content.`value` `content`, source.`value` `source`, term.`value` `term`, mobile.`value` `mobile`, tablet.`value` `tablet`, ws.submitted, ps.doi FROM {form_map_history} fmh JOIN {form_map} fm ON fmh.fmid = fm.fmid JOIN {node} np ON fm.vid = np.vid JOIN {webform_submissions} ws ON fmh.sid = ws.sid JOIN {partner_submission} ps ON ws.sid = ps.sid AND fm.vid = ps.vid JOIN {node} n ON ws.nid = n.nid LEFT JOIN {webform_submission_extra} `adgroup` ON ws.sid = `adgroup`.sid AND `adgroup`.`name` = 'adgroup' LEFT JOIN {webform_submission_extra} `campaign` ON ws.sid = `campaign`.sid AND `campaign`.`name` = 'campaign' LEFT JOIN {webform_submission_extra} `content` ON ws.sid = `content`.sid AND `content`.`name` = 'content' LEFT JOIN {webform_submission_extra} `source` ON ws.sid = `source`.sid AND `source`.`name` = 'source' LEFT JOIN {webform_submission_extra} `term` ON ws.sid = `term`.sid AND `term`.`name` = 'term' LEFT JOIN {webform_submission_extra} `mobile` ON ws.sid = `mobile`.sid AND `mobile`.`name` = 'mobile' LEFT JOIN {webform_submission_extra} `tablet` ON ws.sid = `tablet`.sid AND `tablet`.`name` = 'tablet' WHERE ws.submitted BETWEEN %d AND %d ORDER BY `partner`, sid

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
62.15 ms | 404 KiB | 8 Q