3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_tld() { $host = explode( ':', 'refer-wordpress-com-staging.go-vip.co' ); $domain_list = explode( '.', $host[0] ); return ( count( $domain_list ) > 1 ) ? implode( '.', array_slice( $domain_list, - 2 ) ) : $host[0]; } echo get_tld();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lDGL9
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'get_tld'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function get_tld:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 24
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lDGL9
function name:  get_tld
number of ops:  28
compiled vars:  !0 = $host, !1 = $domain_list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '%3A'
          2        SEND_VAL                                                 'refer-wordpress-com-staging.go-vip.co'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    5     5        INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '.'
          7        FETCH_DIM_R                                      ~4      !0, 0
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    6    11        COUNT                                            ~7      !1
         12        IS_SMALLER                                               1, ~7
         13      > JMPZ                                                     ~8, ->24
         14    >   INIT_FCALL                                               'implode'
         15        SEND_VAL                                                 '.'
         16        INIT_FCALL                                               'array_slice'
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 -2
         19        DO_ICALL                                         $9      
         20        SEND_VAR                                                 $9
         21        DO_ICALL                                         $10     
         22        QM_ASSIGN                                        ~11     $10
         23      > JMP                                                      ->26
         24    >   FETCH_DIM_R                                      ~12     !0, 0
         25        QM_ASSIGN                                        ~11     ~12
         26    > > RETURN                                                   ~11
    7    27*     > RETURN                                                   null

End of function get_tld

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.06 ms | 1399 KiB | 20 Q