3v4l.org

run code in 300+ PHP versions simultaneously
<form action="" method="GET"> <input type="text" name="search"> <input type="submit" name="submit" value="Search"> </form><br /> <?php $_GET['search'] = 'apple/e\00phpinfo();'; if (isset($_GET['search'])){ $search = htmlentities($_GET['search']); if (strpos($search, 'apple') !== false){ echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "apple"); }elseif (strpos($search, 'orange') !== false){ echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "orange"); }elseif (strpos($search, 'banana') !== false){ echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "banana"); }elseif (strpos($search, 'kiwi') !== false){ echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "kiwi"); }else echo "Please search for apple, orange, banana, or kiwi."; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 86
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 31
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 86
Branch analysis from position: 86
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 49
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 86
Branch analysis from position: 86
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 67
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 86
Branch analysis from position: 86
Branch analysis from position: 67
2 jumps found. (Code = 43) Position 1 = 73, Position 2 = 85
Branch analysis from position: 73
1 jumps found. (Code = 42) Position 1 = 86
Branch analysis from position: 86
Branch analysis from position: 85
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 86
filename:       /in/FPhML
function name:  (null)
number of ops:  87
compiled vars:  !0 = $search
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Cform+action%3D%22%22+method%3D%22GET%22%3E%0A%3Cinput+type%3D%22text%22+name%3D%22search%22%3E%0A%3Cinput+type%3D%22submit%22+name%3D%22submit%22+value%3D%22Search%22%3E%0A%3C%2Fform%3E%3Cbr+%2F%3E%0A+%0A'
    7     1        FETCH_W                      global              $1      '_GET'
          2        ASSIGN_DIM                                               $1, 'search'
          3        OP_DATA                                                  'apple%2Fe%5C00phpinfo%28%29%3B'
    8     4        FETCH_IS                                         ~3      '_GET'
          5        ISSET_ISEMPTY_DIM_OBJ                         0          ~3, 'search'
          6      > JMPZ                                                     ~4, ->86
    9     7    >   INIT_FCALL                                               'htmlentities'
          8        FETCH_R                      global              ~5      '_GET'
          9        FETCH_DIM_R                                      ~6      ~5, 'search'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !0, $7
   10    13        INIT_FCALL                                               'strpos'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'apple'
         16        DO_ICALL                                         $9      
         17        TYPE_CHECK                                  1018          $9
         18      > JMPZ                                                     ~10, ->31
   11    19    >   INIT_FCALL                                               'preg_replace'
         20        CONCAT                                           ~11     '%2F', !0
         21        CONCAT                                           ~12     ~11, '%2F'
         22        SEND_VAL                                                 ~12
         23        CONCAT                                           ~13     !0, '+%3Cimg+src%3D%27'
         24        CONCAT                                           ~14     ~13, !0
         25        CONCAT                                           ~15     ~14, '.png%27%3E'
         26        SEND_VAL                                                 ~15
         27        SEND_VAL                                                 'apple'
         28        DO_ICALL                                         $16     
         29        ECHO                                                     $16
         30      > JMP                                                      ->86
   12    31    >   INIT_FCALL                                               'strpos'
         32        SEND_VAR                                                 !0
         33        SEND_VAL                                                 'orange'
         34        DO_ICALL                                         $17     
         35        TYPE_CHECK                                  1018          $17
         36      > JMPZ                                                     ~18, ->49
   13    37    >   INIT_FCALL                                               'preg_replace'
         38        CONCAT                                           ~19     '%2F', !0
         39        CONCAT                                           ~20     ~19, '%2F'
         40        SEND_VAL                                                 ~20
         41        CONCAT                                           ~21     !0, '+%3Cimg+src%3D%27'
         42        CONCAT                                           ~22     ~21, !0
         43        CONCAT                                           ~23     ~22, '.png%27%3E'
         44        SEND_VAL                                                 ~23
         45        SEND_VAL                                                 'orange'
         46        DO_ICALL                                         $24     
         47        ECHO                                                     $24
         48      > JMP                                                      ->86
   14    49    >   INIT_FCALL                                               'strpos'
         50        SEND_VAR                                                 !0
         51        SEND_VAL                                                 'banana'
         52        DO_ICALL                                         $25     
         53        TYPE_CHECK                                  1018          $25
         54      > JMPZ                                                     ~26, ->67
   15    55    >   INIT_FCALL                                               'preg_replace'
         56        CONCAT                                           ~27     '%2F', !0
         57        CONCAT                                           ~28     ~27, '%2F'
         58        SEND_VAL                                                 ~28
         59        CONCAT                                           ~29     !0, '+%3Cimg+src%3D%27'
         60        CONCAT                                           ~30     ~29, !0
         61        CONCAT                                           ~31     ~30, '.png%27%3E'
         62        SEND_VAL                                                 ~31
         63        SEND_VAL                                                 'banana'
         64        DO_ICALL                                         $32     
         65        ECHO                                                     $32
         66      > JMP                                                      ->86
   16    67    >   INIT_FCALL                                               'strpos'
         68        SEND_VAR                                                 !0
         69        SEND_VAL                                                 'kiwi'
         70        DO_ICALL                                         $33     
         71        TYPE_CHECK                                  1018          $33
         72      > JMPZ                                                     ~34, ->85
   17    73    >   INIT_FCALL                                               'preg_replace'
         74        CONCAT                                           ~35     '%2F', !0
         75        CONCAT                                           ~36     ~35, '%2F'
         76        SEND_VAL                                                 ~36
         77        CONCAT                                           ~37     !0, '+%3Cimg+src%3D%27'
         78        CONCAT                                           ~38     ~37, !0
         79        CONCAT                                           ~39     ~38, '.png%27%3E'
         80        SEND_VAL                                                 ~39
         81        SEND_VAL                                                 'kiwi'
         82        DO_ICALL                                         $40     
         83        ECHO                                                     $40
         84      > JMP                                                      ->86
   18    85    >   ECHO                                                     'Please+search+for+apple%2C+orange%2C+banana%2C+or+kiwi.'
   20    86    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.37 ms | 1404 KiB | 19 Q