3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.57 ms | 1387 KiB | 19 Q