3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search = htmlentities("apple'\e"); if (strpos($search, 'apple') !== false){ echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "apple"); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/We6SI
function name:  (null)
number of ops:  22
compiled vars:  !0 = $search
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'htmlentities'
          1        SEND_VAL                                                 'apple%27%1B'
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
    3     4        INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'apple'
          7        DO_ICALL                                         $3      
          8        TYPE_CHECK                                  1018          $3
          9      > JMPZ                                                     ~4, ->21
    4    10    >   INIT_FCALL                                               'preg_replace'
         11        CONCAT                                           ~5      '%2F', !0
         12        CONCAT                                           ~6      ~5, '%2F'
         13        SEND_VAL                                                 ~6
         14        CONCAT                                           ~7      !0, '+%3Cimg+src%3D%27'
         15        CONCAT                                           ~8      ~7, !0
         16        CONCAT                                           ~9      ~8, '.png%27%3E'
         17        SEND_VAL                                                 ~9
         18        SEND_VAL                                                 'apple'
         19        DO_ICALL                                         $10     
         20        ECHO                                                     $10
    6    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.55 ms | 1386 KiB | 19 Q