3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cakedata = [ ["shape" => "Heart", "flavor" => "Chocolate", "toppings" => "Cookies"], ["shape" => "Rectangle", "flavor" => "Vanilla", "toppings" => "Spun-sugar Flowers"], ["shape" => "Square", "flavor" => "Lemon", "toppings" => "Mini Chocolate Candies"], ["shape" => "Round", "flavor" => "Cheesecake", "toppings" => "Marshmallows"] ]; $td = <<<'TD' <td><label><input type="radio" name="%1$s" value="%2$s" required>%2$s</label></td> TD; foreach ($cakedata as $row) { echo '<tr>'; foreach ($row as $attr => $value) { printf($td, htmlentities($attr), htmlentities($value)); } echo '</tr>'; }
Output for git.master, git.master_jit, rfc.property-hooks
<tr> <td><label><input type="radio" name="shape" value="Heart" required>Heart</label></td> <td><label><input type="radio" name="flavor" value="Chocolate" required>Chocolate</label></td> <td><label><input type="radio" name="toppings" value="Cookies" required>Cookies</label></td></tr><tr> <td><label><input type="radio" name="shape" value="Rectangle" required>Rectangle</label></td> <td><label><input type="radio" name="flavor" value="Vanilla" required>Vanilla</label></td> <td><label><input type="radio" name="toppings" value="Spun-sugar Flowers" required>Spun-sugar Flowers</label></td></tr><tr> <td><label><input type="radio" name="shape" value="Square" required>Square</label></td> <td><label><input type="radio" name="flavor" value="Lemon" required>Lemon</label></td> <td><label><input type="radio" name="toppings" value="Mini Chocolate Candies" required>Mini Chocolate Candies</label></td></tr><tr> <td><label><input type="radio" name="shape" value="Round" required>Round</label></td> <td><label><input type="radio" name="flavor" value="Cheesecake" required>Cheesecake</label></td> <td><label><input type="radio" name="toppings" value="Marshmallows" required>Marshmallows</label></td></tr>

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:
92.85 ms | 409 KiB | 5 Q