3v4l.org

run code in 300+ PHP versions simultaneously
<?php $main_url_host = 'main.example.com'; $current_url_host = 'subdomain.main.example.com'; preg_match('~(.+)*\.' . $main_url_host. '$~', $current_url_host, $matches ); var_dump( $matches );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G2XLt
function name:  (null)
number of ops:  13
compiled vars:  !0 = $main_url_host, !1 = $current_url_host, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'main.example.com'
    3     1        ASSIGN                                                   !1, 'subdomain.main.example.com'
    5     2        INIT_FCALL                                               'preg_match'
          3        CONCAT                                           ~5      '%7E%28.%2B%29%2A%5C.', !0
          4        CONCAT                                           ~6      ~5, '%24%7E'
          5        SEND_VAL                                                 ~6
          6        SEND_VAR                                                 !1
          7        SEND_REF                                                 !2
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.81 ms | 1394 KiB | 17 Q