3v4l.org

run code in 300+ PHP versions simultaneously
<?php $size = getimagesize("http://i1-win.softpedia-static.com/screenshots/Nokia-Monitor-Test_1.png"); $fp = fopen($filename, "rb"); if ($size && $fp) { header("Content-type: {$size['mime']}"); fpassthru($fp); exit; } else { // error }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 23
Branch analysis from position: 12
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/udp5A
function name:  (null)
number of ops:  24
compiled vars:  !0 = $size, !1 = $fp, !2 = $filename
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'getimagesize'
          1        SEND_VAL                                                 'http%3A%2F%2Fi1-win.softpedia-static.com%2Fscreenshots%2FNokia-Monitor-Test_1.png'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    3     4        INIT_FCALL                                               'fopen'
          5        SEND_VAR                                                 !2
          6        SEND_VAL                                                 'rb'
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    4     9      > JMPZ_EX                                          ~7      !0, ->11
         10    >   BOOL                                             ~7      !1
         11    > > JMPZ                                                     ~7, ->23
    5    12    >   INIT_FCALL                                               'header'
         13        NOP                                                      
         14        FETCH_DIM_R                                      ~8      !0, 'mime'
         15        FAST_CONCAT                                      ~9      'Content-type%3A+', ~8
         16        SEND_VAL                                                 ~9
         17        DO_ICALL                                                 
    6    18        INIT_FCALL                                               'fpassthru'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
    7    21      > EXIT                                                     
         22*       JMP                                                      ->23
   10    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.86 ms | 1395 KiB | 21 Q