3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.42 ms | 1392 KiB | 19 Q