3v4l.org

run code in 300+ PHP versions simultaneously
<?php $table_arr = array('al5data','al6data'); //if (empty($table_arr)) $table_arr[]=$this->table; //if (in_array('al5data',$table_arr)) $idfield = 'dataid'; // else $idfield = 'data_id'; //if (empty($id_arr)) $id_arr = $this->id_arr; $query =""; foreach ($table_arr AS $table) { $idfield = $this->getPriKey($table); if ('al5data' !== $table) $query .= " UNION "; $query .= "(SELECT `$idfield`, `pt_last_name`, `pt_first_name`, `start_date`, \"" . $table . "\" AS `table` FROM `" . $table . "`)"; } $query .= " ORDER BY STR_TO_DATE(`start_date`, '%m/%d/%Y') DESC, `$idfield` DESC LIMIT 0,100"; echo $query;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Using $this when not in object context in /in/IqbOu:13 Stack trace: #0 {main} thrown in /in/IqbOu on line 13
Process exited with code 255.

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:
71.98 ms | 401 KiB | 8 Q