3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = "<html><body> vdfbsdbg \n </body> \n </html>"; $pos = strpos($html, '</body>'); if ($pos !== false) { $html = substr($html, 0, $pos); $html = $html . '==IMG==' . substr($html, $pos); print_r($html); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 24
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/A4DY9
function name:  (null)
number of ops:  25
compiled vars:  !0 = $html, !1 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Chtml%3E%3Cbody%3E+vdfbsdbg+%0A+%3C%2Fbody%3E+%0A+%3C%2Fhtml%3E'
    4     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%3C%2Fbody%3E'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    6     6        TYPE_CHECK                                  1018          !1
          7      > JMPZ                                                     ~5, ->24
    7     8    >   INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 0
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !0, $6
    8    14        CONCAT                                           ~8      !0, '%3D%3DIMG%3D%3D'
         15        INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $9      
         19        CONCAT                                           ~10     ~8, $9
         20        ASSIGN                                                   !0, ~10
   10    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
   11    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.03 ms | 1395 KiB | 19 Q