3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function _its_video_gallery_livestream_thumbnail($cid, $vid) { // $url = 'http://x'.$cid.'x.api.channel.livestream.com/2.0/thumbnail.json?id='.$vid; // $response = drupal_http_request($url); $example = '{"thumbnail":{"@url":"http:\/\/www.livestream.com\/filestore\/user-files\/chlukeestv\/2010\/01\/04\/92609a8d-afa6-4832-a8b2-ac4dc2925f4b_10.jpg"}}'; $json = drupal_json_decode($example); $thumbnail = $json->thumbnail; return $thumbnail->{'@url'}; } echo _its_video_gallery_livestream_thumbnail('abc','123');
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function drupal_json_decode() in /in/Zc3du:7 Stack trace: #0 /in/Zc3du(12): _its_video_gallery_livestream_thumbnail('abc', '123') #1 {main} thrown in /in/Zc3du on line 7
Process exited with code 255.
Output for 5.3.7 - 5.6.28, hhvm-3.10.0 - 3.12.0
Fatal error: Call to undefined function drupal_json_decode() in /in/Zc3du on line 7
Process exited with code 255.