3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$search = htmlentities($_GET['search']); $search="phpinfo()\/*|apple/e"; 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 = 18
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 36
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 54
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 72
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d20TL
function name:  (null)
number of ops:  74
compiled vars:  !0 = $search
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'phpinfo%28%29%5C%2F%2A%7Capple%2Fe'
    4     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'apple'
          4        DO_ICALL                                         $2      
          5        TYPE_CHECK                                  1018          $2
          6      > JMPZ                                                     ~3, ->18
    5     7    >   INIT_FCALL                                               'preg_replace'
          8        CONCAT                                           ~4      '%2F', !0
          9        SEND_VAL                                                 ~4
         10        CONCAT                                           ~5      !0, '+%3Cimg+src%3D%27'
         11        CONCAT                                           ~6      ~5, !0
         12        CONCAT                                           ~7      ~6, '.png%27%3E'
         13        SEND_VAL                                                 ~7
         14        SEND_VAL                                                 'apple'
         15        DO_ICALL                                         $8      
         16        ECHO                                                     $8
         17      > JMP                                                      ->73
    6    18    >   INIT_FCALL                                               'strpos'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 'orange'
         21        DO_ICALL                                         $9      
         22        TYPE_CHECK                                  1018          $9
         23      > JMPZ                                                     ~10, ->36
    7    24    >   INIT_FCALL                                               'preg_replace'
         25        CONCAT                                           ~11     '%2F', !0
         26        CONCAT                                           ~12     ~11, '%2F'
         27        SEND_VAL                                                 ~12
         28        CONCAT                                           ~13     !0, '+%3Cimg+src%3D%27'
         29        CONCAT                                           ~14     ~13, !0
         30        CONCAT                                           ~15     ~14, '.png%27%3E'
         31        SEND_VAL                                                 ~15
         32        SEND_VAL                                                 'orange'
         33        DO_ICALL                                         $16     
         34        ECHO                                                     $16
         35      > JMP                                                      ->73
    8    36    >   INIT_FCALL                                               'strpos'
         37        SEND_VAR                                                 !0
         38        SEND_VAL                                                 'banana'
         39        DO_ICALL                                         $17     
         40        TYPE_CHECK                                  1018          $17
         41      > JMPZ                                                     ~18, ->54
    9    42    >   INIT_FCALL                                               'preg_replace'
         43        CONCAT                                           ~19     '%2F', !0
         44        CONCAT                                           ~20     ~19, '%2F'
         45        SEND_VAL                                                 ~20
         46        CONCAT                                           ~21     !0, '+%3Cimg+src%3D%27'
         47        CONCAT                                           ~22     ~21, !0
         48        CONCAT                                           ~23     ~22, '.png%27%3E'
         49        SEND_VAL                                                 ~23
         50        SEND_VAL                                                 'banana'
         51        DO_ICALL                                         $24     
         52        ECHO                                                     $24
         53      > JMP                                                      ->73
   10    54    >   INIT_FCALL                                               'strpos'
         55        SEND_VAR                                                 !0
         56        SEND_VAL                                                 'kiwi'
         57        DO_ICALL                                         $25     
         58        TYPE_CHECK                                  1018          $25
         59      > JMPZ                                                     ~26, ->72
   11    60    >   INIT_FCALL                                               'preg_replace'
         61        CONCAT                                           ~27     '%2F', !0
         62        CONCAT                                           ~28     ~27, '%2F'
         63        SEND_VAL                                                 ~28
         64        CONCAT                                           ~29     !0, '+%3Cimg+src%3D%27'
         65        CONCAT                                           ~30     ~29, !0
         66        CONCAT                                           ~31     ~30, '.png%27%3E'
         67        SEND_VAL                                                 ~31
         68        SEND_VAL                                                 'kiwi'
         69        DO_ICALL                                         $32     
         70        ECHO                                                     $32
         71      > JMP                                                      ->73
   12    72    >   ECHO                                                     'Please+search+for+apple%2C+orange%2C+banana%2C+or+kiwi.'
         73    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.8 ms | 1400 KiB | 17 Q