3v4l.org

run code in 300+ PHP versions simultaneously
<?php // get host name from URL preg_match('@^(?:http://)?([^/]+)@i', "http://example.uk", $matches); $host = $matches[2]; // get last two segments of host name preg_match('/([^.]+)\.[^.]+$/', $host, $matches); echo "domain name is: {$matches[0]}\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E03kA
function name:  (null)
number of ops:  18
compiled vars:  !0 = $matches, !1 = $host
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%40%5E%28%3F%3Ahttp%3A%2F%2F%29%3F%28%5B%5E%2F%5D%2B%29%40i'
    5     2        SEND_VAL                                                 'http%3A%2F%2Fexample.uk'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                                 
    6     5        FETCH_DIM_R                                      ~3      !0, 2
          6        ASSIGN                                                   !1, ~3
    9     7        INIT_FCALL                                               'preg_match'
          8        SEND_VAL                                                 '%2F%28%5B%5E.%5D%2B%29%5C.%5B%5E.%5D%2B%24%2F'
          9        SEND_VAR                                                 !1
         10        SEND_REF                                                 !0
         11        DO_ICALL                                                 
   10    12        ROPE_INIT                                     3  ~8      'domain+name+is%3A+'
         13        FETCH_DIM_R                                      ~6      !0, 0
         14        ROPE_ADD                                      1  ~8      ~8, ~6
         15        ROPE_END                                      2  ~7      ~8, '%0A'
         16        ECHO                                                     ~7
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.28 ms | 1394 KiB | 15 Q