3v4l.org

run code in 500+ PHP versions simultaneously
<?php $path = "item/image/365141.jpg"; preg_match( '/^\/*(?:(item|swatch)\/+)?(?:([\w|\-]+)\/+)?([\w|\-]+)(?:\.([a-z|A-Z]{3,4}))?$/', $path, $matches); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2JOhI
function name:  (null)
number of ops:  10
compiled vars:  !0 = $path, !1 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'item%2Fimage%2F365141.jpg'
    5     1        INIT_FCALL                                                   'preg_match'
    6     2        SEND_VAL                                                     '%2F%5E%5C%2F%2A%28%3F%3A%28item%7Cswatch%29%5C%2F%2B%29%3F%28%3F%3A%28%5B%5Cw%7C%5C-%5D%2B%29%5C%2F%2B%29%3F%28%5B%5Cw%7C%5C-%5D%2B%29%28%3F%3A%5C.%28%5Ba-z%7CA-Z%5D%7B3%2C4%7D%29%29%3F%24%2F'
    7     3        SEND_VAR                                                     !0
    8     4        SEND_REF                                                     !1
    5     5        DO_ICALL                                                     
   10     6        INIT_FCALL                                                   'print_r'
          7        SEND_VAR                                                     !1
          8        DO_ICALL                                                     
          9      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
116.25 ms | 486 KiB | 11 Q