3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = [ (object)['menu_id' => 1, 'menu_name' => 'one'], (object)['menu_id' => 2, 'menu_name' => 'two'], (object)['menu_id' => 3, 'menu_name' => 'three'], ]; ?> <form action=""> <table> <thead> <tr> <th>Menu Id</th> <th>Menu Name</th> <th>Yes/No</th> </tr> </thead> <tbody> <?php foreach($result as $res) { ?> <tr> <td><?= $res->menu_id ?></td> <td><?= $res->menu_name ?></td> <td><input type="checkbox" name="yes[<?= $res->menu_id ?>]" value="1"></td> </tr> <?php } ?> </tbody> </table>
Output for git.master_jit, git.master, rfc.property-hooks
<form action=""> <table> <thead> <tr> <th>Menu Id</th> <th>Menu Name</th> <th>Yes/No</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>one</td> <td><input type="checkbox" name="yes[1]" value="1"></td> </tr> <tr> <td>2</td> <td>two</td> <td><input type="checkbox" name="yes[2]" value="1"></td> </tr> <tr> <td>3</td> <td>three</td> <td><input type="checkbox" name="yes[3]" value="1"></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:
74.61 ms | 402 KiB | 8 Q