3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.57 ms | 1400 KiB | 19 Q