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 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 = 4, Position 2 = 83
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 28
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 46
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 64
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 70, Position 2 = 82
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 82
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 83
filename:       /in/TNf8o
function name:  (null)
number of ops:  84
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_IS                                         ~1      '_GET'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, 'search'
          3      > JMPZ                                                     ~2, ->83
    8     4    >   INIT_FCALL                                               'htmlentities'
          5        FETCH_R                      global              ~3      '_GET'
          6        FETCH_DIM_R                                      ~4      ~3, 'search'
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !0, $5
    9    10        INIT_FCALL                                               'strpos'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 'apple'
         13        DO_ICALL                                         $7      
         14        TYPE_CHECK                                  1018          $7
         15      > JMPZ                                                     ~8, ->28
   10    16    >   INIT_FCALL                                               'preg_replace'
         17        CONCAT                                           ~9      '%2F', !0
         18        CONCAT                                           ~10     ~9, '%2F'
         19        SEND_VAL                                                 ~10
         20        CONCAT                                           ~11     !0, '+%3Cimg+src%3D%27'
         21        CONCAT                                           ~12     ~11, !0
         22        CONCAT                                           ~13     ~12, '.png%27%3E'
         23        SEND_VAL                                                 ~13
         24        SEND_VAL                                                 'apple'
         25        DO_ICALL                                         $14     
         26        ECHO                                                     $14
         27      > JMP                                                      ->83
   11    28    >   INIT_FCALL                                               'strpos'
         29        SEND_VAR                                                 !0
         30        SEND_VAL                                                 'orange'
         31        DO_ICALL                                         $15     
         32        TYPE_CHECK                                  1018          $15
         33      > JMPZ                                                     ~16, ->46
   12    34    >   INIT_FCALL                                               'preg_replace'
         35        CONCAT                                           ~17     '%2F', !0
         36        CONCAT                                           ~18     ~17, '%2F'
         37        SEND_VAL                                                 ~18
         38        CONCAT                                           ~19     !0, '+%3Cimg+src%3D%27'
         39        CONCAT                                           ~20     ~19, !0
         40        CONCAT                                           ~21     ~20, '.png%27%3E'
         41        SEND_VAL                                                 ~21
         42        SEND_VAL                                                 'orange'
         43        DO_ICALL                                         $22     
         44        ECHO                                                     $22
         45      > JMP                                                      ->83
   13    46    >   INIT_FCALL                                               'strpos'
         47        SEND_VAR                                                 !0
         48        SEND_VAL                                                 'banana'
         49        DO_ICALL                                         $23     
         50        TYPE_CHECK                                  1018          $23
         51      > JMPZ                                                     ~24, ->64
   14    52    >   INIT_FCALL                                               'preg_replace'
         53        CONCAT                                           ~25     '%2F', !0
         54        CONCAT                                           ~26     ~25, '%2F'
         55        SEND_VAL                                                 ~26
         56        CONCAT                                           ~27     !0, '+%3Cimg+src%3D%27'
         57        CONCAT                                           ~28     ~27, !0
         58        CONCAT                                           ~29     ~28, '.png%27%3E'
         59        SEND_VAL                                                 ~29
         60        SEND_VAL                                                 'banana'
         61        DO_ICALL                                         $30     
         62        ECHO                                                     $30
         63      > JMP                                                      ->83
   15    64    >   INIT_FCALL                                               'strpos'
         65        SEND_VAR                                                 !0
         66        SEND_VAL                                                 'kiwi'
         67        DO_ICALL                                         $31     
         68        TYPE_CHECK                                  1018          $31
         69      > JMPZ                                                     ~32, ->82
   16    70    >   INIT_FCALL                                               'preg_replace'
         71        CONCAT                                           ~33     '%2F', !0
         72        CONCAT                                           ~34     ~33, '%2F'
         73        SEND_VAL                                                 ~34
         74        CONCAT                                           ~35     !0, '+%3Cimg+src%3D%27'
         75        CONCAT                                           ~36     ~35, !0
         76        CONCAT                                           ~37     ~36, '.png%27%3E'
         77        SEND_VAL                                                 ~37
         78        SEND_VAL                                                 'kiwi'
         79        DO_ICALL                                         $38     
         80        ECHO                                                     $38
         81      > JMP                                                      ->83
   17    82    >   ECHO                                                     'Please+search+for+apple%2C+orange%2C+banana%2C+or+kiwi.'
   19    83    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.94 ms | 1404 KiB | 19 Q