3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.35 ms | 1398 KiB | 19 Q