3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match('^catalog\\/[a-zA-Z0-9_\-\.]\\/.*$', 'catalog/bisque/mayco/samples/mayco_mb1211_0.jpg', $matches); $directory = $matches[0] ?? ''; var_dump($directory);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WsKjD
function name:  (null)
number of ops:  13
compiled vars:  !0 = $matches, !1 = $directory
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%5Ecatalog%5C%2F%5Ba-zA-Z0-9_%5C-%5C.%5D%5C%2F.%2A%24'
          2        SEND_VAL                                                 'catalog%2Fbisque%2Fmayco%2Fsamples%2Fmayco_mb1211_0.jpg'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                                 
    5     5        FETCH_DIM_IS                                     ~3      !0, 0
          6        COALESCE                                         ~4      ~3
          7        QM_ASSIGN                                        ~4      ''
          8        ASSIGN                                                   !1, ~4
    7     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
226.56 ms | 1394 KiB | 17 Q