3v4l.org

run code in 300+ PHP versions simultaneously
<?php $schedule = '{ "Monday" : { "00-06" : "Non-stop", "06-08" : "Wake up" }, "Friday" : { "00-06" : "Non-stop", "18-21" : "Friday Night Party" }, "Saturday" : { "00-06" : "Non-stop", "19-22" : "Saturday Night Club Mix" }, "Sunday" : { "00-04" : "Party cool down", "04-24" : "Non-stop" } } '; $schedule = json_decode($schedule, true); foreach ($schedule as $time => $show) { echo '<h2>Monday</h2>'; foreach ($time as $timee) { echo $timee . ' - ' . $show;} }
Output for git.master, git.master_jit, rfc.property-hooks
<h2>Monday</h2> Warning: foreach() argument must be of type array|object, string given in /in/P3IAV on line 26 <h2>Monday</h2> Warning: foreach() argument must be of type array|object, string given in /in/P3IAV on line 26 <h2>Monday</h2> Warning: foreach() argument must be of type array|object, string given in /in/P3IAV on line 26 <h2>Monday</h2> Warning: foreach() argument must be of type array|object, string given in /in/P3IAV on line 26

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:
34.42 ms | 402 KiB | 8 Q