3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.27 ms | 1400 KiB | 17 Q