3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ '<p>test:</p>', '<p>test: foo</p>', '<p>foo:</p>', '<p>: foo</p>', '<p>test </p><p>:</p>', ]; foreach ($input as $val) { echo(preg_replace('/(<p>)([^<]+?:)(.*)/', '$1<strong>$2</strong>$3', $val)); echo("\n"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 11
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/3YCKc
function name:  (null)
number of ops:  13
compiled vars:  !0 = $input, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1      > FE_RESET_R                                       $3      !0, ->11
          2    > > FE_FETCH_R                                               $3, !1, ->11
   12     3    >   INIT_FCALL                                               'preg_replace'
          4        SEND_VAL                                                 '%2F%28%3Cp%3E%29%28%5B%5E%3C%5D%2B%3F%3A%29%28.%2A%29%2F'
          5        SEND_VAL                                                 '%241%3Cstrong%3E%242%3C%2Fstrong%3E%243'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $4      
          8        ECHO                                                     $4
   13     9        ECHO                                                     '%0A'
   11    10      > JMP                                                      ->2
         11    >   FE_FREE                                                  $3
   14    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.5 ms | 1399 KiB | 15 Q