3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$search = htmlentities($_GET['search']); $search=htmlentities("{${eval("echo 'apple\n'; echo phpinfo();//(?=/)\e")}}"); 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 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uq9lk
function name:  (null)
number of ops:  28
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+%27apple%0A%27%3B+echo+phpinfo%28%29%3B%2F%2F%28%3F%3D%2F%29%1B', 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                                                      ->27
   14    26    >   ECHO                                                     'Don%27t+work.'
         27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.64 ms | 1395 KiB | 19 Q