3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'My Name ## is #P_NAM3# and \r\n I am #P_AG2# years old'; //$r = '#([^#]+)#'; //$r = '#[(?<name>\S+)\]#'; $r = '#.+?#'; //$r = '#(.+?)#'; //$r = '#\w*#'; preg_match_all('/'.$r.'/m', $text, $m); var_dump($m);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bPEYX
function name:  (null)
number of ops:  13
compiled vars:  !0 = $text, !1 = $r, !2 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'My+Name+%23%23+is+%23P_NAM3%23+and+%5Cr%5Cn+I+am+%23P_AG2%23+years+old'
    6     1        ASSIGN                                                   !1, '%23.%2B%3F%23'
   10     2        INIT_FCALL                                               'preg_match_all'
          3        CONCAT                                           ~5      '%2F', !1
          4        CONCAT                                           ~6      ~5, '%2Fm'
          5        SEND_VAL                                                 ~6
          6        SEND_VAR                                                 !0
          7        SEND_REF                                                 !2
          8        DO_ICALL                                                 
   11     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.5 ms | 1385 KiB | 17 Q