3v4l.org

run code in 300+ PHP versions simultaneously
<?php function special_text( $content ) { $search_for = 'specialtext'; $replace_with = '<span class="special-text"><strong>special</strong>text</span>'; return preg_replace( '/<a.*?<\/a>(*SKIP)(*F)|'.$search_for.'/m', $replace_with, $content ); } echo "jjfjjejfjjeef";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WV4fA
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'jjfjjejfjjeef'
          1      > RETURN                                                   1

Function special_text:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WV4fA
function name:  special_text
number of ops:  12
compiled vars:  !0 = $content, !1 = $search_for, !2 = $replace_with
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 'specialtext'
    5     2        ASSIGN                                                   !2, '%3Cspan+class%3D%22special-text%22%3E%3Cstrong%3Especial%3C%2Fstrong%3Etext%3C%2Fspan%3E'
    6     3        INIT_FCALL                                               'preg_replace'
          4        CONCAT                                           ~5      '%2F%3Ca.%2A%3F%3C%5C%2Fa%3E%28%2ASKIP%29%28%2AF%29%7C', !1
          5        CONCAT                                           ~6      ~5, '%2Fm'
          6        SEND_VAL                                                 ~6
          7        SEND_VAR                                                 !2
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $7      
         10      > RETURN                                                   $7
    7    11*     > RETURN                                                   null

End of function special_text

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.85 ms | 1395 KiB | 15 Q