3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search = htmlentities($_GET['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/LlWnA
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        FETCH_R                      global              ~1      '_GET'
          2        FETCH_DIM_R                                      ~2      ~1, 'search'
          3        SEND_VAL                                                 ~2
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    3     6        INIT_FCALL                                               'strpos'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 'apple'
          9        DO_ICALL                                         $5      
         10        TYPE_CHECK                                  1018          $5
         11      > JMPZ                                                     ~6, ->24
    4    12    >   INIT_FCALL                                               'preg_replace'
         13        CONCAT                                           ~7      '%2F', !0
         14        CONCAT                                           ~8      ~7, '%2F'
         15        SEND_VAL                                                 ~8
         16        CONCAT                                           ~9      !0, '+%3Cimg+src%3D%27'
         17        CONCAT                                           ~10     ~9, !0
         18        CONCAT                                           ~11     ~10, '.png%27%3E'
         19        SEND_VAL                                                 ~11
         20        SEND_VAL                                                 'apple'
         21        DO_ICALL                                         $12     
         22        ECHO                                                     $12
         23      > JMP                                                      ->79
    5    24    >   INIT_FCALL                                               'strpos'
         25        SEND_VAR                                                 !0
         26        SEND_VAL                                                 'orange'
         27        DO_ICALL                                         $13     
         28        TYPE_CHECK                                  1018          $13
         29      > JMPZ                                                     ~14, ->42
    6    30    >   INIT_FCALL                                               'preg_replace'
         31        CONCAT                                           ~15     '%2F', !0
         32        CONCAT                                           ~16     ~15, '%2F'
         33        SEND_VAL                                                 ~16
         34        CONCAT                                           ~17     !0, '+%3Cimg+src%3D%27'
         35        CONCAT                                           ~18     ~17, !0
         36        CONCAT                                           ~19     ~18, '.png%27%3E'
         37        SEND_VAL                                                 ~19
         38        SEND_VAL                                                 'orange'
         39        DO_ICALL                                         $20     
         40        ECHO                                                     $20
         41      > JMP                                                      ->79
    7    42    >   INIT_FCALL                                               'strpos'
         43        SEND_VAR                                                 !0
         44        SEND_VAL                                                 'banana'
         45        DO_ICALL                                         $21     
         46        TYPE_CHECK                                  1018          $21
         47      > JMPZ                                                     ~22, ->60
    8    48    >   INIT_FCALL                                               'preg_replace'
         49        CONCAT                                           ~23     '%2F', !0
         50        CONCAT                                           ~24     ~23, '%2F'
         51        SEND_VAL                                                 ~24
         52        CONCAT                                           ~25     !0, '+%3Cimg+src%3D%27'
         53        CONCAT                                           ~26     ~25, !0
         54        CONCAT                                           ~27     ~26, '.png%27%3E'
         55        SEND_VAL                                                 ~27
         56        SEND_VAL                                                 'banana'
         57        DO_ICALL                                         $28     
         58        ECHO                                                     $28
         59      > JMP                                                      ->79
    9    60    >   INIT_FCALL                                               'strpos'
         61        SEND_VAR                                                 !0
         62        SEND_VAL                                                 'kiwi'
         63        DO_ICALL                                         $29     
         64        TYPE_CHECK                                  1018          $29
         65      > JMPZ                                                     ~30, ->78
   10    66    >   INIT_FCALL                                               'preg_replace'
         67        CONCAT                                           ~31     '%2F', !0
         68        CONCAT                                           ~32     ~31, '%2F'
         69        SEND_VAL                                                 ~32
         70        CONCAT                                           ~33     !0, '+%3Cimg+src%3D%27'
         71        CONCAT                                           ~34     ~33, !0
         72        CONCAT                                           ~35     ~34, '.png%27%3E'
         73        SEND_VAL                                                 ~35
         74        SEND_VAL                                                 'kiwi'
         75        DO_ICALL                                         $36     
         76        ECHO                                                     $36
         77      > JMP                                                      ->79
   11    78    >   ECHO                                                     'Please+search+for+apple%2C+orange%2C+banana%2C+or+kiwi.'
   12    79    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.16 ms | 1400 KiB | 19 Q