3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nice = 1; $u = 'data://,Good%20Work!'; if (!isset ($u)) $nice = 0; if (ereg ('\.', $u)) $nice = 0; if (ereg ('http', $u) ) $nice = 0; if (ereg ('https', $u) ) $nice = 0; if (ereg ('ftp', $u)) $nice = 0; if (ereg ('telnet', $u)) $nice = 0; if ($nice) { if (@file_exists ($u)) $nice = 0; } echo $nice; if ($nice) { $nice = @file_get_contents ($u); echo $nice; if ($nice === 'Good Work!') echo 'ok'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 30
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 44
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 44
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 56
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 56
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 56
Branch analysis from position: 56
Branch analysis from position: 44
Branch analysis from position: 44
Branch analysis from position: 36
Branch analysis from position: 30
Branch analysis from position: 24
Branch analysis from position: 18
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/qm77c
function name:  (null)
number of ops:  57
compiled vars:  !0 = $nice, !1 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    3     1        ASSIGN                                                   !1, 'data%3A%2F%2F%2CGood%2520Work%21'
    4     2        ISSET_ISEMPTY_CV                                 ~4      !1
          3        BOOL_NOT                                         ~5      ~4
          4      > JMPZ                                                     ~5, ->6
          5    >   ASSIGN                                                   !0, 0
    5     6    >   INIT_FCALL_BY_NAME                                       'ereg'
          7        SEND_VAL_EX                                              '%5C.'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $7      
         10      > JMPZ                                                     $7, ->12
         11    >   ASSIGN                                                   !0, 0
    7    12    >   INIT_FCALL_BY_NAME                                       'ereg'
         13        SEND_VAL_EX                                              'http'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $9      
         16      > JMPZ                                                     $9, ->18
         17    >   ASSIGN                                                   !0, 0
    8    18    >   INIT_FCALL_BY_NAME                                       'ereg'
         19        SEND_VAL_EX                                              'https'
         20        SEND_VAR_EX                                              !1
         21        DO_FCALL                                      0  $11     
         22      > JMPZ                                                     $11, ->24
         23    >   ASSIGN                                                   !0, 0
    9    24    >   INIT_FCALL_BY_NAME                                       'ereg'
         25        SEND_VAL_EX                                              'ftp'
         26        SEND_VAR_EX                                              !1
         27        DO_FCALL                                      0  $13     
         28      > JMPZ                                                     $13, ->30
         29    >   ASSIGN                                                   !0, 0
   10    30    >   INIT_FCALL_BY_NAME                                       'ereg'
         31        SEND_VAL_EX                                              'telnet'
         32        SEND_VAR_EX                                              !1
         33        DO_FCALL                                      0  $15     
         34      > JMPZ                                                     $15, ->36
         35    >   ASSIGN                                                   !0, 0
   12    36    > > JMPZ                                                     !0, ->44
   13    37    >   BEGIN_SILENCE                                    ~17     
         38        INIT_FCALL                                               'file_exists'
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                         $18     
         41        END_SILENCE                                              ~17
         42      > JMPZ                                                     $18, ->44
         43    >   ASSIGN                                                   !0, 0
   15    44    >   ECHO                                                     !0
   16    45      > JMPZ                                                     !0, ->56
   17    46    >   BEGIN_SILENCE                                    ~20     
         47        INIT_FCALL                                               'file_get_contents'
         48        SEND_VAR                                                 !1
         49        DO_ICALL                                         $21     
         50        END_SILENCE                                              ~20
         51        ASSIGN                                                   !0, $21
   18    52        ECHO                                                     !0
   19    53        IS_IDENTICAL                                             !0, 'Good+Work%21'
         54      > JMPZ                                                     ~23, ->56
         55    >   ECHO                                                     'ok'
   21    56    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.73 ms | 1400 KiB | 17 Q