3v4l.org

run code in 300+ PHP versions simultaneously
<?php $names = ['Name 1', 'Name 2', 'Name 3', 'Name 4', 'Name 5', 'Name 6', 'Name 7']; if($names) : echo '<table>'; $counter = 1; foreach($names as $i) : if($counter%2 !== 0) { // Start new row echo '<tr>'; } echo '<td>' . $i . '</td>'; if($counter%2 == 0) { // End row echo '</tr>'; } $counter++; endforeach; if($counter%2 == 0) { // Last empty cell echo '<td></td></tr>'; } echo '</table>'; endif; ?>
Output for git.master, git.master_jit, rfc.property-hooks
<table><tr><td>Name 1</td><td>Name 2</td></tr><tr><td>Name 3</td><td>Name 4</td></tr><tr><td>Name 5</td><td>Name 6</td></tr><tr><td>Name 7</td><td></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:
32.99 ms | 401 KiB | 8 Q