3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expr = '#[a-z][a-z0-9.]*://(?:[^:@]+(?:[^@]+)?@)?[^:/]+(?::[0-9]+)?/([^/]+)#'; $str = 'http://dontmatchthis.local/butmatchthisplease'; preg_match($expr, $str, $matches); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/83Ea7
function name:  (null)
number of ops:  11
compiled vars:  !0 = $expr, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%23%5Ba-z%5D%5Ba-z0-9.%5D%2A%3A%2F%2F%28%3F%3A%5B%5E%3A%40%5D%2B%28%3F%3A%5B%5E%40%5D%2B%29%3F%40%29%3F%5B%5E%3A%2F%5D%2B%28%3F%3A%3A%5B0-9%5D%2B%29%3F%2F%28%5B%5E%2F%5D%2B%29%23'
    4     1        ASSIGN                                                   !1, 'http%3A%2F%2Fdontmatchthis.local%2Fbutmatchthisplease'
    5     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.34 ms | 939 KiB | 18 Q