3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.08 ms | 1400 KiB | 17 Q