3v4l.org

run code in 300+ PHP versions simultaneously
<?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 ?>
Output for 8.1.0 - 8.1.29, 8.2.0 - 8.2.21, 8.3.0 - 8.3.9
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for gdata.youtube.com 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 for gdata.youtube.com failed: System error in /in/kcj88 on line 1 Warning: Attempt to read property "feed" on null in /in/kcj88 on line 2 Warning: Attempt to read property "entry" on null in /in/kcj88 on line 2 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/kcj88:3 Stack trace: #0 {main} thrown in /in/kcj88 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/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 Warning: Attempt to read property "feed" on null in /in/kcj88 on line 2 Warning: Attempt to read property "entry" on null in /in/kcj88 on line 2 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/kcj88:3 Stack trace: #0 {main} thrown in /in/kcj88 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/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: Temporary failure in name resolution in /in/kcj88 on line 1 Warning: Attempt to read property "feed" on null in /in/kcj88 on line 2 Warning: Attempt to read property "entry" on null in /in/kcj88 on line 2 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/kcj88:3 Stack trace: #0 {main} thrown in /in/kcj88 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/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: Temporary failure in name resolution in /in/kcj88 on line 1 Warning: Attempt to read property "feed" on null in /in/kcj88 on line 2 Warning: Attempt to read property "entry" on null in /in/kcj88 on line 2 Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in /in/kcj88:3 Stack trace: #0 {main} thrown in /in/kcj88 on line 3
Process exited with code 255.
Output for 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0, 7.4.26 - 7.4.33
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 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/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: Temporary failure in name resolution 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 7.3.32 - 7.3.33
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 Warning: count(): Parameter must be an array or an object that implements Countable in /in/kcj88 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.33
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.0.5, 5.1.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.3.11, 4.4.0 - 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

preferences:
311.56 ms | 402 KiB | 458 Q