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 ('[0-9]', $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 = 41, Position 2 = 42
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 50
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 50
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 62
Branch analysis from position: 52
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 62
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 62
Branch analysis from position: 62
Branch analysis from position: 50
Branch analysis from position: 50
Branch analysis from position: 42
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/NB44e
function name:  (null)
number of ops:  63
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                                              '%5B0-9%5D'
         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                                              'http'
         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                                              'https'
         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                                              'ftp'
         32        SEND_VAR_EX                                              !1
         33        DO_FCALL                                      0  $15     
         34      > JMPZ                                                     $15, ->36
         35    >   ASSIGN                                                   !0, 0
   11    36    >   INIT_FCALL_BY_NAME                                       'ereg'
         37        SEND_VAL_EX                                              'telnet'
         38        SEND_VAR_EX                                              !1
         39        DO_FCALL                                      0  $17     
         40      > JMPZ                                                     $17, ->42
         41    >   ASSIGN                                                   !0, 0
   13    42    > > JMPZ                                                     !0, ->50
   14    43    >   BEGIN_SILENCE                                    ~19     
         44        INIT_FCALL                                               'file_exists'
         45        SEND_VAR                                                 !1
         46        DO_ICALL                                         $20     
         47        END_SILENCE                                              ~19
         48      > JMPZ                                                     $20, ->50
         49    >   ASSIGN                                                   !0, 0
   16    50    >   ECHO                                                     !0
   17    51      > JMPZ                                                     !0, ->62
   18    52    >   BEGIN_SILENCE                                    ~22     
         53        INIT_FCALL                                               'file_get_contents'
         54        SEND_VAR                                                 !1
         55        DO_ICALL                                         $23     
         56        END_SILENCE                                              ~22
         57        ASSIGN                                                   !0, $23
   19    58        ECHO                                                     !0
   20    59        IS_IDENTICAL                                             !0, 'Good+Work%21'
         60      > JMPZ                                                     ~25, ->62
         61    >   ECHO                                                     'ok'
   22    62    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.98 ms | 1400 KiB | 17 Q