3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://www.example.com#anchor'; $host = parse_url($url, PHP_URL_HOST); // www.example.com preg_match('/(\w+)\.(\w+)$/', $host, $matches); $array_result = array ( "name" => $matches[1], "tld" => $matches[2] ); print_r($array_result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0aEgu
function name:  (null)
number of ops:  20
compiled vars:  !0 = $url, !1 = $host, !2 = $matches, !3 = $array_result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fwww.example.com%23anchor'
    4     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%2F%28%5Cw%2B%29%5C.%28%5Cw%2B%29%24%2F'
          8        SEND_VAR                                                 !1
          9        SEND_REF                                                 !2
         10        DO_ICALL                                                 
    6    11        FETCH_DIM_R                                      ~8      !2, 1
         12        INIT_ARRAY                                       ~9      ~8, 'name'
    7    13        FETCH_DIM_R                                      ~10     !2, 2
         14        ADD_ARRAY_ELEMENT                                ~9      ~10, 'tld'
    6    15        ASSIGN                                                   !3, ~9
    8    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.66 ms | 1012 KiB | 16 Q