3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.39 ms | 1392 KiB | 19 Q