3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.4 ms | 1392 KiB | 17 Q