3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Fetch YouTube data from ID * @param string $id YouTube ID: http://youtube.com/watch?v=[ID] (es: http://youtube.com/watch?v=ik1PUh5GO3g) * @return array */ function get_youtube_data($id) { $data = file_get_contents('http://www.youtube.com/get_video_info?&video_id=' . $id); parse_str($data, $data); return $data; } $t = get_youtube_data('ik1PUh5GO3g');

preferences:
41.77 ms | 402 KiB | 5 Q