3v4l.org

run code in 300+ PHP versions simultaneously
<?php #Settings $interval = 30; $filename = 'picture.jpg'; $url = "http://www.goudenspike.nl/webcam/picture.jpg"; $fetchurl = "http://77.172.6.176:50015/picture.jpg"; #get file time if (file_exists($filename)) { $filetime = filemtime($filename); } else { copy($fetchurl,$filename); $filetime = filemtime($filename); } $time = time(); $diff = $time - $filetime; if($diff > $interval){ copy($fetchurl,$filename); } #header("Location: $url"); echo "<meta http-equiv=refresh content=30><IMG SRC=$url WIDTH=576 HEIGHT=432>"; exit; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
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
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
Branch analysis from position: 32
filename:       /in/Qm9IU
function name:  (null)
number of ops:  38
compiled vars:  !0 = $interval, !1 = $filename, !2 = $url, !3 = $fetchurl, !4 = $filetime, !5 = $time, !6 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 30
    4     1        ASSIGN                                                   !1, 'picture.jpg'
    5     2        ASSIGN                                                   !2, 'http%3A%2F%2Fwww.goudenspike.nl%2Fwebcam%2Fpicture.jpg'
    6     3        ASSIGN                                                   !3, 'http%3A%2F%2F77.172.6.176%3A50015%2Fpicture.jpg'
    9     4        INIT_FCALL                                               'file_exists'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $11     
          7      > JMPZ                                                     $11, ->13
   10     8    >   INIT_FCALL                                               'filemtime'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $12     
         11        ASSIGN                                                   !4, $12
         12      > JMP                                                      ->21
   12    13    >   INIT_FCALL                                               'copy'
         14        SEND_VAR                                                 !3
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   13    17        INIT_FCALL                                               'filemtime'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $15     
         20        ASSIGN                                                   !4, $15
   16    21    >   INIT_FCALL                                               'time'
         22        DO_ICALL                                         $17     
         23        ASSIGN                                                   !5, $17
   17    24        SUB                                              ~19     !5, !4
         25        ASSIGN                                                   !6, ~19
   19    26        IS_SMALLER                                               !0, !6
         27      > JMPZ                                                     ~21, ->32
   20    28    >   INIT_FCALL                                               'copy'
         29        SEND_VAR                                                 !3
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                                 
   24    32    >   ROPE_INIT                                     3  ~24     '%3Cmeta+http-equiv%3Drefresh+content%3D30%3E%3CIMG+SRC%3D'
         33        ROPE_ADD                                      1  ~24     ~24, !2
         34        ROPE_END                                      2  ~23     ~24, '+WIDTH%3D576+HEIGHT%3D432%3E'
         35        ECHO                                                     ~23
         36      > EXIT                                                     
         37*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.96 ms | 1405 KiB | 21 Q