3v4l.org

run code in 300+ PHP versions simultaneously
<?php $curl = curl_init('http://s3-ap-southeast-1.amazonaws.com/cobo-nwddev/photo/pho_0Mp1oQ.jpg'); //don't fetch the actual page, you only want headers curl_setopt($curl, CURLOPT_NOBODY, true); //stop it from outputting stuff to stdout curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // attempt to retrieve the modification date curl_setopt($curl, CURLOPT_FILETIME, true); $result = curl_exec($curl); if ($result === false) { die (curl_error($curl)); } $timestamp = curl_getinfo($curl, CURLINFO_FILETIME); if ($timestamp != -1) { //otherwise unknown echo date("Y-m-d H:i:s", $timestamp); //etc }
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/7HNgZ:2 Stack trace: #0 {main} thrown in /in/7HNgZ on line 2
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/7HNgZ on line 2
Process exited with code 255.

preferences:
191.54 ms | 401 KiB | 235 Q