3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_url = 'foo.bar.baz.com'; $current_domains = explode( '.', $current_url ); $current_top_domain = array_slice( $current_domains, 2 ); echo implode( '.', $current_top_domain );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nTPCj
function name:  (null)
number of ops:  17
compiled vars:  !0 = $current_url, !1 = $current_domains, !2 = $current_top_domain
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo.bar.baz.com'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '.'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    6     6        INIT_FCALL                                               'array_slice'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 2
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    8    11        INIT_FCALL                                               'implode'
         12        SEND_VAL                                                 '.'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $8      
         15        ECHO                                                     $8
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.98 ms | 1394 KiB | 19 Q