3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $client_id = "6813c5d125013568ef986b73e4ba265c"; require_once 'functions.php'; //$client = new Services_Soundcloud('6813c5d125013568ef986b73e4ba265c', '2eb6f212de6f4963c3873f8afdf517e9'); // a permalink to a track $track_url = 'http://soundcloud.com/forss/voca-nomen-tuum'; if($_GET['url']){ $track_url = $_GET['url']; } $url="http://api.soundcloud.com/resolve.json?url=$track_url&client_id=$client_id"; $headers1=get_headers($url,1); $location1=$headers['Location']; $location1 = modify_url(array('client_id' => '6813c5d125013568ef986b73e4ba265c'), $location1); $location1=str_replace("//tracks","/tracks",$location1); $json = file_get_contents($location1); $obj = json_decode($json, true); $stream=$obj['stream_url']."?client_id=$client_id"; $track_id=$obj['id']; $headers2=get_headers($stream,1); $location2=$headers2['Location']; if(!$_GET['d']){ echo $track_id; echo $obj; } else { $m2=file_get_contents($location2); $rand=rand(1,100000); $filename="files/".$track_id."-".$rand.".mp3"; file_put_contents($filename,$m2); echo "<a href=$filename>download</a>"; } ?>
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: require_once(functions.php): failed to open stream: No such file or directory in /in/8spC1 on line 3 Fatal error: require_once(): Failed opening required 'functions.php' (include_path='.:') in /in/8spC1 on line 3
Process exited with code 255.
Output for hhvm-3.12.0
Fatal error: File not found: functions.php in /in/8spC1 on line 3
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.2 - 5.0.5
Warning: main(functions.php): failed to open stream: No such file or directory in /in/8spC1 on line 3 Fatal error: main(): Failed opening required 'functions.php' (include_path='.:') in /in/8spC1 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: main(functions.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/8spC1 on line 3 Fatal error: main() [http://www.php.net/function.main]: Failed opening required 'functions.php' (include_path='.:') in /in/8spC1 on line 3