3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.28 ms | 1400 KiB | 17 Q