3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "<tag>i dont know what is here</tag> don't remove this text"; $string = preg_replace('|^<([a-z]*).*|', '<$1></$1>', $string); echo $string; // <tag></tag>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HBRYV
function name:  (null)
number of ops:  9
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Ctag%3Ei+dont+know+what+is+here%3C%2Ftag%3E+don%27t+remove+this+text'
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%7C%5E%3C%28%5Ba-z%5D%2A%29.%2A%7C'
          3        SEND_VAL                                                 '%3C%241%3E%3C%2F%241%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    5     7        ECHO                                                     !0
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.84 ms | 1394 KiB | 15 Q