3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.5 ms | 1395 KiB | 19 Q