3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nice = 1; $u = 'data://,Good Work!'; if (!isset ($u)) $nice = 0; if (ereg ('\.', $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; } if ($nice) { $nice = @file_get_contents ($u); echo $nice; if ($nice === 'Good Work!') echo 'ok'; } ?>
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
Jump found. Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
Jump found. Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
Jump found. Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
Jump found. Position 1 = 29, Position 2 = 30
Branch analysis from position: 29
Jump found. Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
Jump found. Position 1 = 41, Position 2 = 42
Branch analysis from position: 41
Jump found. Position 1 = 47, Position 2 = 48
Branch analysis from position: 47
Jump found. Position 1 = 49, Position 2 = 56
Branch analysis from position: 49
Jump found. Position 1 = 55, Position 2 = 56
Branch analysis from position: 55
Jump found. Position 1 = 57, Position 2 = 67
Branch analysis from position: 57
Jump found. Position 1 = 66, Position 2 = 67
Branch analysis from position: 66
Jump found. Position 1 = -2
Branch analysis from position: 67
Branch analysis from position: 67
Branch analysis from position: 56
Branch analysis from position: 56
Branch analysis from position: 48
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/BVFa4
function name:  (null)
number of ops:  68
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+Work%21'
   4     2        ISSET_ISEMPTY_VAR                           310378496  ~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
   6    12    >   INIT_FCALL_BY_NAME                                       'ereg'
        13        SEND_VAL_EX                                              '%25'
        14        SEND_VAR_EX                                              !1
        15        DO_FCALL                                      0  $9      
        16      > JMPZ                                                     $9, ->18
        17    >   ASSIGN                                                   !0, 0
   7    18    >   INIT_FCALL_BY_NAME                                       'ereg'
        19        SEND_VAL_EX                                              '%5B0-9%5D'
        20        SEND_VAR_EX                                              !1
        21        DO_FCALL                                      0  $11     
        22      > JMPZ                                                     $11, ->24
        23    >   ASSIGN                                                   !0, 0
   8    24    >   INIT_FCALL_BY_NAME                                       'ereg'
        25        SEND_VAL_EX                                              'http'
        26        SEND_VAR_EX                                              !1
        27        DO_FCALL                                      0  $13     
        28      > JMPZ                                                     $13, ->30
        29    >   ASSIGN                                                   !0, 0
   9    30    >   INIT_FCALL_BY_NAME                                       'ereg'
        31        SEND_VAL_EX                                              'https'
        32        SEND_VAR_EX                                              !1
        33        DO_FCALL                                      0  $15     
        34      > JMPZ                                                     $15, ->36
        35    >   ASSIGN                                                   !0, 0
  10    36    >   INIT_FCALL_BY_NAME                                       'ereg'
        37        SEND_VAL_EX                                              'ftp'
        38        SEND_VAR_EX                                              !1
        39        DO_FCALL                                      0  $17     
        40      > JMPZ                                                     $17, ->42
        41    >   ASSIGN                                                   !0, 0
  11    42    >   INIT_FCALL_BY_NAME                                       'ereg'
        43        SEND_VAL_EX                                              'telnet'
        44        SEND_VAR_EX                                              !1
        45        DO_FCALL                                      0  $19     
        46      > JMPZ                                                     $19, ->48
        47    >   ASSIGN                                                   !0, 0
  12    48    > > JMPZ                                                     !0, ->56
  13    49    >   BEGIN_SILENCE                                    ~21     
        50        INIT_FCALL                                               'file_exists'
        51        SEND_VAR                                                 !1
        52        DO_ICALL                                         $22     
        53        END_SILENCE                                              ~21
        54      > JMPZ                                                     $22, ->56
        55    >   ASSIGN                                                   !0, 0
  15    56    > > JMPZ                                                     !0, ->67
  16    57    >   BEGIN_SILENCE                                    ~24     
        58        INIT_FCALL                                               'file_get_contents'
        59        SEND_VAR                                                 !1
        60        DO_ICALL                                         $25     
        61        END_SILENCE                                              ~24
        62        ASSIGN                                                   !0, $25
  17    63        ECHO                                                     !0
  18    64        IS_IDENTICAL                                     ~27     !0, 'Good+Work%21'
        65      > JMPZ                                                     ~27, ->67
        66    >   ECHO                                                     'ok'
        67    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0