3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getHTTPInfo($url, $followLocation = false) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_NOBODY, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_MAXREDIRS, 5); curl_setopt($curl, CURLOPT_TIMEOUT, 30); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, $followLocation); curl_exec($curl); $httpStatus = curl_getinfo($curl, CURLINFO_HTTP_CODE); $effectiveURL = curl_getinfo($curl, CURLINFO_EFFECTIVE_URL); curl_close($curl); return array('http_code' => $httpStatus, 'effective_url' => $effectiveURL); } $result = getHTTPInfo('http://plantpath.unl.edu/', true); var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/isM5l:4 Stack trace: #0 /in/isM5l(23): getHTTPInfo('http://plantpat...', true) #1 {main} thrown in /in/isM5l on line 4
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:
41.03 ms | 401 KiB | 8 Q