3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.14 ms | 1396 KiB | 19 Q