3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '{^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?}'; $url = 'https://example.com/a/support/topic/'; $result = preg_match( $pattern, $url, $matches ); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nnt0M
function name:  (null)
number of ops:  12
compiled vars:  !0 = $pattern, !1 = $url, !2 = $result, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%5E%28%28%5B%5E%3A%2F%3F%23%5D%2B%29%3A%29%3F%28%2F%2F%28%5B%5E%2F%3F%23%5D%2A%29%29%3F%28%5B%5E%3F%23%5D%2A%29%28%5C%3F%28%5B%5E%23%5D%2A%29%29%3F%28%23%28.%2A%29%29%3F%7D'
    3     1        ASSIGN                                                   !1, 'https%3A%2F%2Fexample.com%2Fa%2Fsupport%2Ftopic%2F'
    4     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !3
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    6     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.24 ms | 1398 KiB | 17 Q