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 #`abc`#'; $r = '#([^#]*)#'; //$r = '#(?P<name>.*?)#'; //$r = '#(\w*)#'; preg_match_all('/'.$r.'/m', $text, $m); var_dump($m); echo preg_replace('/'.$r.'/m', '$2_es', $text);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IJE2V
function name:  (null)
number of ops:  21
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+%23%22P_NAM3%22%23+and+%5Cr%5Cn+I+am+%23%27P_AG2%27%23+years+old+%23%60abc%60%23'
    4     1        ASSIGN                                                   !1, '%23%28%5B%5E%23%5D%2A%29%23'
    8     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                                                 
    9     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   12    12        INIT_FCALL                                               'preg_replace'
         13        CONCAT                                           ~9      '%2F', !1
         14        CONCAT                                           ~10     ~9, '%2Fm'
         15        SEND_VAL                                                 ~10
         16        SEND_VAL                                                 '%242_es'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $11     
         19        ECHO                                                     $11
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.29 ms | 1395 KiB | 19 Q