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 }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 45
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
filename:       /in/7HNgZ
function name:  (null)
number of ops:  46
compiled vars:  !0 = $curl, !1 = $result, !2 = $timestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        SEND_VAL_EX                                              'http%3A%2F%2Fs3-ap-southeast-1.amazonaws.com%2Fcobo-nwddev%2Fphoto%2Fpho_0Mp1oQ.jpg'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !0, $3
    5     4        INIT_FCALL_BY_NAME                                       'curl_setopt'
          5        SEND_VAR_EX                                              !0
          6        FETCH_CONSTANT                                   ~5      'CURLOPT_NOBODY'
          7        SEND_VAL_EX                                              ~5
          8        SEND_VAL_EX                                              <true>
          9        DO_FCALL                                      0          
    8    10        INIT_FCALL_BY_NAME                                       'curl_setopt'
         11        SEND_VAR_EX                                              !0
         12        FETCH_CONSTANT                                   ~7      'CURLOPT_RETURNTRANSFER'
         13        SEND_VAL_EX                                              ~7
         14        SEND_VAL_EX                                              <true>
         15        DO_FCALL                                      0          
   11    16        INIT_FCALL_BY_NAME                                       'curl_setopt'
         17        SEND_VAR_EX                                              !0
         18        FETCH_CONSTANT                                   ~9      'CURLOPT_FILETIME'
         19        SEND_VAL_EX                                              ~9
         20        SEND_VAL_EX                                              <true>
         21        DO_FCALL                                      0          
   13    22        INIT_FCALL_BY_NAME                                       'curl_exec'
         23        SEND_VAR_EX                                              !0
         24        DO_FCALL                                      0  $11     
         25        ASSIGN                                                   !1, $11
   15    26        TYPE_CHECK                                    4          !1
         27      > JMPZ                                                     ~13, ->32
   16    28    >   INIT_FCALL_BY_NAME                                       'curl_error'
         29        SEND_VAR_EX                                              !0
         30        DO_FCALL                                      0  $14     
         31      > EXIT                                                     $14
   19    32    >   INIT_FCALL_BY_NAME                                       'curl_getinfo'
         33        SEND_VAR_EX                                              !0
         34        FETCH_CONSTANT                                   ~15     'CURLINFO_FILETIME'
         35        SEND_VAL_EX                                              ~15
         36        DO_FCALL                                      0  $16     
         37        ASSIGN                                                   !2, $16
   20    38        IS_NOT_EQUAL                                             !2, -1
         39      > JMPZ                                                     ~18, ->45
   21    40    >   INIT_FCALL                                               'date'
         41        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         42        SEND_VAR                                                 !2
         43        DO_ICALL                                         $19     
         44        ECHO                                                     $19
   22    45    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.04 ms | 1400 KiB | 15 Q