3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = array( '#tag', 'text #tag text', 'text #tag', 'text#tag', ); $res = preg_filter('/\B#(\S{1,24}+)/u', '#<$1>' , $var); print_r($res); echo preg_replace('/#(\S{1,24}+)/u', '#<$1>' , 'text#tag');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qbeaS
function name:  (null)
number of ops:  17
compiled vars:  !0 = $var, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'preg_filter'
          2        SEND_VAL                                                 '%2F%5CB%23%28%5CS%7B1%2C24%7D%2B%29%2Fu'
          3        SEND_VAL                                                 '%23%3C%241%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    9     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   10    10        INIT_FCALL                                               'preg_replace'
         11        SEND_VAL                                                 '%2F%23%28%5CS%7B1%2C24%7D%2B%29%2Fu'
         12        SEND_VAL                                                 '%23%3C%241%3E'
         13        SEND_VAL                                                 'text%23tag'
         14        DO_ICALL                                         $6      
         15        ECHO                                                     $6
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.5 ms | 1386 KiB | 19 Q