3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.09 ms | 1387 KiB | 19 Q