3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "#/(?<moduleName>[^/]+)/layout/[^/]*\.xml$#i"; $filename = "/var/www/project/vendor/magento/theme-frontend-blank/Magento_Theme/layout/default_head_blocks.xml"; var_dump(preg_match($pattern, $filename, $matches), $matches); $pattern = "#/([^/]+)/layout/[^/]*\.xml$#i"; var_dump(preg_match($pattern, $filename, $matches), $matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4YDGj
function name:  (null)
number of ops:  22
compiled vars:  !0 = $pattern, !1 = $filename, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%23%2F%28%3F%3CmoduleName%3E%5B%5E%2F%5D%2B%29%2Flayout%2F%5B%5E%2F%5D%2A%5C.xml%24%23i'
    4     1        ASSIGN                                                   !1, '%2Fvar%2Fwww%2Fproject%2Fvendor%2Fmagento%2Ftheme-frontend-blank%2FMagento_Theme%2Flayout%2Fdefault_head_blocks.xml'
    6     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'preg_match'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !2
          7        DO_ICALL                                         $5      
          8        SEND_VAR                                                 $5
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
    8    11        ASSIGN                                                   !0, '%23%2F%28%5B%5E%2F%5D%2B%29%2Flayout%2F%5B%5E%2F%5D%2A%5C.xml%24%23i'
   10    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'preg_match'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !1
         16        SEND_REF                                                 !2
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
214.49 ms | 1395 KiB | 17 Q