3v4l.org

run code in 300+ PHP versions simultaneously
<?php $menu_id = $_POST['menu_id']; $menu_name = $_POST['menu_name']; $yes = $_POST['yes']; ?> <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><input type="text" name="menu_id[]" value="<?= $res->menu_id ?>"></td> <td><input type="text" name="menu_name[]" value="<?= $res->menu_name ?>"></td> <td><input type="checkbox" name="yes[]" value="<?= $res->menu_id ?>"></td> </tr> <?php } ?> </tbody> </table>
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined array key "menu_id" in /in/SIu5D on line 3 Warning: Undefined array key "menu_name" in /in/SIu5D on line 4 Warning: Undefined array key "yes" in /in/SIu5D on line 5 <form action=""> <table> <thead> <tr> <th>Menu Id</th> <th>Menu Name</th> <th>Yes/No</th> </tr> </thead> <tbody> Warning: Undefined variable $result in /in/SIu5D on line 19 Warning: foreach() argument must be of type array|object, null given in /in/SIu5D on line 19 </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:
43.51 ms | 1716 KiB | 4 Q