3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'UU3dESJmRgwl8j3X80c9wTwg'; // YouTube API URL retrieves the fields we want in JSON format so that it's super easy to work with $api_url = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=%s&key=AIzaSyAMUb-pd1gAIeNmu3nUrarg6_397QJQXEo'; // Get the videos for our user with 'wp_remote_get()' $response = http_get( sprintf($api_url, $username) , array("timeout"=>1), $info ); echo(response); echo($info); // Let's decode what we retrieved so that we can store it efficiently $item_data = json_decode( $info ); // If our info isn't in an array then these next steps won't work-- return false if ( !is_array( $item_data ) ) { return false; } // Let's sort through everything we've got. We'll keep the stuff we need and drop the rest from the array. $item_data = $item_data['feed']['entry']; foreach(array_keys($item_data) as $key) { echo($item_data[$key]['title']['$t']); }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function http_get() in /in/RmBCq:8 Stack trace: #0 {main} thrown in /in/RmBCq on line 8
Process exited with code 255.

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.33 ms | 401 KiB | 8 Q