3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = '<p>"bla" bla</p>'; echo preg_replace( '~<p>\W*\K\w~', '<span class="first_letter">$0</span>', $str );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IIFYT
function name:  (null)
number of ops:  5
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%3Cp%3E%22bla%22+bla%3C%2Fp%3E'
    5     1        FRAMELESS_ICALL_3                preg_replace        ~2      '%7E%3Cp%3E%5CW%2A%5CK%5Cw%7E', '%3Cspan+class%3D%22first_letter%22%3E%240%3C%2Fspan%3E'
    8     2        OP_DATA                                                      !0
          3        ECHO                                                         ~2
    9     4      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.42 ms | 1710 KiB | 13 Q