3v4l.org

run code in 300+ PHP versions simultaneously
<?php $m = "<p>Foo</p><p>Bar</p>"; $m = preg_replace('/<p>/i', '', $m); $m = preg_replace('/<\/p>(.+)/i', '<br>$1', $m); echo $m;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hZSnd
function name:  (null)
number of ops:  15
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cp%3EFoo%3C%2Fp%3E%3Cp%3EBar%3C%2Fp%3E'
    5     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%3Cp%3E%2Fi'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    6     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%3C%5C%2Fp%3E%28.%2B%29%2Fi'
          9        SEND_VAL                                                 '%3Cbr%3E%241'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        ASSIGN                                                   !0, $4
    8    13        ECHO                                                     !0
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.48 ms | 1394 KiB | 15 Q