3v4l.org

run code in 300+ PHP versions simultaneously
<?php $request_2 = '{ "URINA II (Exame Sumário da Urina)": { "Cor": "Amarela", "Aspecto": "Límpido", "Densidade": "1.021", "pH": "7.0", "Proteínas": "Vestígios", "Glucose": "Negativo", "Corpos Cetónicos": "Negativo", "Urobilinogénio": "Negativo", "Bilirrubina": "Negativo", "Nitritos": "Negativo", "Esterase leucocitária (Leucócitos)": "+ +", "Hemoglobina": "+ +" }, "Exame do Sedimento": { "Células Epiteliais": "0-2/campo", "Leucócitos": "15 - 25 /campo", " Eritrócitos ":"15-25/campo" }, "Urina, Exame Microbiológico (Urocultura)": { "Células epiteliais":"0-2/campo", "Leucócitos":"15 - 25/campo", "Eritrócitos":"15-25/campo" }, "Ex. Directo Gram":"Negativo", "URINA E DOSEAMENTOS URINÁRIOS": { "Ex. Cultural Resultado":"Negativo" } }'; $obj = json_decode($request_2, true); ?> <table> <thead> <?php foreach($obj as $key=>$values){ if(is_array($values)){ ?> <?php foreach(array_keys($values) as $val){?> <th><?php echo $key.'/'.$val;?></th> <?php }?> <?php }else{?> <th><?php echo $key;?></th> <?php }}?> </thead> <tbody> <tr> <?php foreach($obj as $key=>$values){ if(is_array($values)){ ?> <?php foreach($values as $val){?> <td><?php echo $val;?></td> <?php }?> <?php }else{ ?> <td><?php echo $values;?></td> <?php }} ?> </tr> </tbody> </table>
Output for git.master_jit, git.master, rfc.property-hooks
<table> <thead> <th>URINA II (Exame Sumário da Urina)/Cor</th> <th>URINA II (Exame Sumário da Urina)/Aspecto</th> <th>URINA II (Exame Sumário da Urina)/Densidade</th> <th>URINA II (Exame Sumário da Urina)/pH</th> <th>URINA II (Exame Sumário da Urina)/Proteínas</th> <th>URINA II (Exame Sumário da Urina)/Glucose</th> <th>URINA II (Exame Sumário da Urina)/Corpos Cetónicos</th> <th>URINA II (Exame Sumário da Urina)/Urobilinogénio</th> <th>URINA II (Exame Sumário da Urina)/Bilirrubina</th> <th>URINA II (Exame Sumário da Urina)/Nitritos</th> <th>URINA II (Exame Sumário da Urina)/Esterase leucocitária (Leucócitos)</th> <th>URINA II (Exame Sumário da Urina)/Hemoglobina</th> <th>Exame do Sedimento/Células Epiteliais</th> <th>Exame do Sedimento/Leucócitos</th> <th>Exame do Sedimento/ Eritrócitos </th> <th>Urina, Exame Microbiológico (Urocultura)/Células epiteliais</th> <th>Urina, Exame Microbiológico (Urocultura)/Leucócitos</th> <th>Urina, Exame Microbiológico (Urocultura)/Eritrócitos</th> <th>Ex. Directo Gram</th> <th>URINA E DOSEAMENTOS URINÁRIOS/Ex. Cultural Resultado</th> </thead> <tbody> <tr> <td>Amarela</td> <td>Límpido</td> <td>1.021</td> <td>7.0</td> <td>Vestígios</td> <td>Negativo</td> <td>Negativo</td> <td>Negativo</td> <td>Negativo</td> <td>Negativo</td> <td>+ +</td> <td>+ +</td> <td>0-2/campo</td> <td>15 - 25 /campo</td> <td>15-25/campo</td> <td>0-2/campo</td> <td>15 - 25/campo</td> <td>15-25/campo</td> <td>Negativo</td> <td>Negativo</td> </tr> </tbody> </table>

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:
54.59 ms | 411 KiB | 5 Q