3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cont = json_decode(file_get_contents('http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?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 ?>
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for gdata.youtube.com failed: System error in /in/3lQun on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?v=2&alt=json&feature=plcp): Failed to open stream: php_network_getaddresses: getaddrinfo for gdata.youtube.com failed: System error in /in/3lQun on line 1 Warning: Attempt to read property "feed" on null in /in/3lQun on line 2 Warning: Attempt to read property "entry" on null in /in/3lQun on line 2 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/3lQun:3 Stack trace: #0 {main} thrown in /in/3lQun on line 3
Process exited with code 255.
Output for 8.0.13 - 8.0.30
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/3lQun on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?v=2&alt=json&feature=plcp): Failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/3lQun on line 1 Warning: Attempt to read property "feed" on null in /in/3lQun on line 2 Warning: Attempt to read property "entry" on null in /in/3lQun on line 2 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/3lQun:3 Stack trace: #0 {main} thrown in /in/3lQun on line 3
Process exited with code 255.
Output for 8.0.10 - 8.0.12
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/3lQun on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?v=2&alt=json&feature=plcp): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/3lQun on line 1 Warning: Attempt to read property "feed" on null in /in/3lQun on line 2 Warning: Attempt to read property "entry" on null in /in/3lQun on line 2 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/3lQun:3 Stack trace: #0 {main} thrown in /in/3lQun on line 3
Process exited with code 255.
Output for 8.0.0 - 8.0.9
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/3lQun on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?v=2&alt=json&feature=plcp): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/3lQun on line 1 Warning: Attempt to read property "feed" on null in /in/3lQun on line 2 Warning: Attempt to read property "entry" on null in /in/3lQun on line 2 Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in /in/3lQun:3 Stack trace: #0 {main} thrown in /in/3lQun on line 3
Process exited with code 255.
Output for 7.2.0 - 7.2.13, 7.3.0, 7.4.0, 7.4.26 - 7.4.33
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/3lQun on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?v=2&alt=json&feature=plcp): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/3lQun on line 1 Notice: Trying to get property 'feed' of non-object in /in/3lQun on line 2 Notice: Trying to get property 'entry' of non-object in /in/3lQun on line 2 Warning: count(): Parameter must be an array or an object that implements Countable in /in/3lQun on line 3
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.25
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/3lQun on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?v=2&alt=json&feature=plcp): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/3lQun on line 1 Notice: Trying to get property 'feed' of non-object in /in/3lQun on line 2 Notice: Trying to get property 'entry' of non-object in /in/3lQun on line 2 Warning: count(): Parameter must be an array or an object that implements Countable in /in/3lQun on line 3
Output for 7.3.32 - 7.3.33
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/3lQun on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?v=2&alt=json&feature=plcp): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/3lQun on line 1 Warning: count(): Parameter must be an array or an object that implements Countable in /in/3lQun on line 3
Output for 5.2.6 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.25
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/3lQun on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?v=2&alt=json&feature=plcp): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/3lQun on line 1 Notice: Trying to get property of non-object in /in/3lQun on line 2 Notice: Trying to get property of non-object in /in/3lQun on line 2
Output for 5.2.0 - 5.2.5
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/3lQun on line 1 Warning: file_get_contents(http://gdata.youtube.com/feeds/api/playlists/AtWAMBKrZSRGVsVxlcW74lU7JB31954X/?v=2&alt=json&feature=plcp): failed to open stream: Connection refused in /in/3lQun on line 1 Notice: Trying to get property of non-object in /in/3lQun on line 2 Notice: Trying to get property of non-object in /in/3lQun on line 2
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/3lQun 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/3lQun on line 1
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/3lQun 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/3lQun on line 1

preferences:
303.93 ms | 401 KiB | 424 Q