3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $cont = json_decode(file_get_contents('http://gdata.youtube.com/feeds/api/playlists/PLAi3KyRwMGQaFJkgXoakfONAm_7onuGcy/?v=2&alt=json&feature=plcp')); ?> <?php $feed = $cont->feed->entry; ?> <?php if(count($feed)): foreach($feed as $item): // youtube start ?> <?php echo $item->title->{'$t'} ?> <br /> <?php echo $item->{'media$group'}->{'media$description'}->{'$t'} ?> <?php echo $item->{'media$group'}->{'yt$videoid'}->{'$t'} ?> <?php endforeach; endif; // youtube end ?>
based on 3lQun
Output for 7.2.0 - 7.3.1
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/kcj88 on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/PLAi3KyRwMGQaFJkgXoakfONAm_7onuGcy/?v=2&alt=json&feature=plcp): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/kcj88 on line 1 Notice: Trying to get property 'feed' of non-object in /in/kcj88 on line 2 Notice: Trying to get property 'entry' of non-object in /in/kcj88 on line 2 Warning: count(): Parameter must be an array or an object that implements Countable in /in/kcj88 on line 3
Output for 5.2.6 - 7.1.25
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/kcj88 on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/PLAi3KyRwMGQaFJkgXoakfONAm_7onuGcy/?v=2&alt=json&feature=plcp): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/kcj88 on line 1 Notice: Trying to get property of non-object in /in/kcj88 on line 2 Notice: Trying to get property of non-object in /in/kcj88 on line 2
Output for 5.2.0 - 5.2.5
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/kcj88 on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/PLAi3KyRwMGQaFJkgXoakfONAm_7onuGcy/?v=2&alt=json&feature=plcp): failed to open stream: Connection refused in /in/kcj88 on line 1 Notice: Trying to get property of non-object in /in/kcj88 on line 2 Notice: Trying to get property of non-object in /in/kcj88 on line 2
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/kcj88 on line 1
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/kcj88 on line 1
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/kcj88 on line 1
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/kcj88 on line 1