3v4l.org

run code in 300+ PHP versions simultaneously
<?php $where = array(); $_GET['CodigoUtente'] = 'sany'; $_GET['Nome'] = 'dddd'; if(isset($_GET['CodigoUtente'])){ $where[] = "CodigoUtente = '".$_GET['CodigoUtente']."'"; } if(isset($_GET['Nome'])){ $where[] = "Nome = '".$_GET['Nome']."'"; } $sql = "SELECT CodigoUtente, Nome, DataNasc, Sexo, Estadocivil, Nacionalidade, Responsavel, Parentesco, Contato FROM centrodb.PsicUtentes"; if(!empty($where)){ $final_where = count($where) > 1 ? implode(' OR ', $where) : end($where); $sql = "$sql WHERE ". $final_where; } echo $sql;
Output for git.master, git.master_jit, rfc.property-hooks
SELECT CodigoUtente, Nome, DataNasc, Sexo, Estadocivil, Nacionalidade, Responsavel, Parentesco, Contato FROM centrodb.PsicUtentes WHERE CodigoUtente = 'sany' OR Nome = 'dddd'

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:
30.49 ms | 405 KiB | 5 Q