3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.72 ms | 1400 KiB | 19 Q