3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $days[] = json_decode(file_get_contents('config/schedule.json'), TRUE); foreach($days as $day) { echo '<div class="day">'; echo '<h2>' . $day . '</h2>'; echo '<ul>'; foreach($day as $time=>$item) { echo '<li>'; echo '<span class="time">' . $time . '</span>&nbsp;'; echo $item; echo '</li>'; } echo '</ul>'; echo '</div>'; }
Output for 5.2.0 - 7.1.0
Warning: file_get_contents(config/schedule.json): failed to open stream: No such file or directory in /in/mgqSg on line 2 <div class="day"><h2></h2><ul> Warning: Invalid argument supplied for foreach() in /in/mgqSg on line 8 </ul></div>
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/mgqSg on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/mgqSg on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/mgqSg on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/mgqSg on line 2