3v4l.org

run code in 300+ PHP versions simultaneously
<?php $resultset=[ ['ShownName'=>'A'], ['ShownName'=>'B'], ['ShownName'=>'C'], ['ShownName'=>'D'], ['ShownName'=>'E'], ['ShownName'=>'F'], ['ShownName'=>'G'] ]; echo "<table>\n"; $counter=0; foreach($resultset as $row){ // you while loop if($counter%5==0){ if($counter){ echo "\t</tr>\n"; } echo "\t<tr>\n"; // start new row } echo "\t\t<td>\n"; echo "\t\t\t<div class=\"card\">\n"; echo "\t\t\t\t<img src=\"img/img_avatar2.png\" alt=\"Avatar\">\n"; echo "\t\t\t\t<div class=\"container\">\n"; echo "\t\t\t\t\t<h4><b>{$row['ShownName']}</b></h4>\n"; echo "\t\t\t\t\t<p style=\"font-family:Roboto;\">Architect & Engineer</p>\n"; echo "\t\t\t\t</div>\n"; echo "\t\t\t</div>\n"; echo "\t\t</td>\n"; ++$counter; } if($mod=($counter%5)){ $colspan=5-$mod; echo "\t\t<td",($colspan>1?" colspan=\"$colspan\"":""),"></td>\n"; // complete the row with appropriately sized cell } echo "\t</tr>\n"; echo "</table>";
Output for git.master, git.master_jit, rfc.property-hooks
<table> <tr> <td> <div class="card"> <img src="img/img_avatar2.png" alt="Avatar"> <div class="container"> <h4><b>A</b></h4> <p style="font-family:Roboto;">Architect & Engineer</p> </div> </div> </td> <td> <div class="card"> <img src="img/img_avatar2.png" alt="Avatar"> <div class="container"> <h4><b>B</b></h4> <p style="font-family:Roboto;">Architect & Engineer</p> </div> </div> </td> <td> <div class="card"> <img src="img/img_avatar2.png" alt="Avatar"> <div class="container"> <h4><b>C</b></h4> <p style="font-family:Roboto;">Architect & Engineer</p> </div> </div> </td> <td> <div class="card"> <img src="img/img_avatar2.png" alt="Avatar"> <div class="container"> <h4><b>D</b></h4> <p style="font-family:Roboto;">Architect & Engineer</p> </div> </div> </td> <td> <div class="card"> <img src="img/img_avatar2.png" alt="Avatar"> <div class="container"> <h4><b>E</b></h4> <p style="font-family:Roboto;">Architect & Engineer</p> </div> </div> </td> </tr> <tr> <td> <div class="card"> <img src="img/img_avatar2.png" alt="Avatar"> <div class="container"> <h4><b>F</b></h4> <p style="font-family:Roboto;">Architect & Engineer</p> </div> </div> </td> <td> <div class="card"> <img src="img/img_avatar2.png" alt="Avatar"> <div class="container"> <h4><b>G</b></h4> <p style="font-family:Roboto;">Architect & Engineer</p> </div> </div> </td> <td colspan="3"></td> </tr> </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:
28.82 ms | 411 KiB | 5 Q