3v4l.org

run code in 300+ PHP versions simultaneously
<?php $getfile='{ "playlist": [ { "title": "Test title", "title_bg": "link/to/image.png", "link": "https://www.google.com", "description": "This is a test JSON Object" } ] }'; $jsonfile = json_decode($getfile); print_r($jsonfile);?> <table align="center"> <tr> <th>Title</th> <th>Background Image</th> <th>Video URL (Link to Video)</th> <th>Description of Video</th> </tr> <?php foreach ($jsonfile->playlist as $obj) { echo '<tr><td>' . $obj->title . '</td>'; echo '<td>' . $obj->title_bg . '</td>'; echo '<td>' . $obj->link . '</td>'; echo '<td>' . $obj->description . '</td></tr>'; } ?> </table>
Output for git.master, git.master_jit, rfc.property-hooks
stdClass Object ( [playlist] => Array ( [0] => stdClass Object ( [title] => Test title [title_bg] => link/to/image.png [link] => https://www.google.com [description] => This is a test JSON Object ) ) ) <table align="center"> <tr> <th>Title</th> <th>Background Image</th> <th>Video URL (Link to Video)</th> <th>Description of Video</th> </tr> <tr><td>Test title</td><td>link/to/image.png</td><td>https://www.google.com</td><td>This is a test JSON Object</td></tr></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:
58.86 ms | 402 KiB | 8 Q