3v4l.org

run code in 300+ PHP versions simultaneously
<?php $host = 'host.dupa.com'; $parts = explode('.', $host); $count = count($parts); echo $parts[$count - 1] .'.'. $parts[$count];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ZodV
function name:  (null)
number of ops:  15
compiled vars:  !0 = $host, !1 = $parts, !2 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'host.dupa.com'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '.'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    6     6        COUNT                                            ~6      !1
          7        ASSIGN                                                   !2, ~6
    8     8        SUB                                              ~8      !2, 1
          9        FETCH_DIM_R                                      ~9      !1, ~8
         10        CONCAT                                           ~10     ~9, '.'
         11        FETCH_DIM_R                                      ~11     !1, !2
         12        CONCAT                                           ~12     ~10, ~11
         13        ECHO                                                     ~12
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.55 ms | 1398 KiB | 15 Q