3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkRemoteFile($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if(curl_exec($ch)!==FALSE) { return true; } else { return false; } } $url = 'http://www.test.fr/video.mp4'; $check = checkRemoteFile($url); if(true == $check){ echo "ok"; }else{ echo "not ok"; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/AP09A:5 Stack trace: #0 /in/AP09A(22): checkRemoteFile('http://www.test...') #1 {main} thrown in /in/AP09A on line 5
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:
55.68 ms | 401 KiB | 8 Q