3v4l.org

run code in 300+ PHP versions simultaneously
<?php $domains = explode(".",str_replace("example.com","","test.example.com")); print "Test: " . $domains[0] . "<br>"; $target = array_pop($domains); print "Target: " . $target . "<br>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hK8d0
function name:  (null)
number of ops:  22
compiled vars:  !0 = $domains, !1 = $target
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '.'
          2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 'example.com'
          4        SEND_VAL                                                 ''
          5        SEND_VAL                                                 'test.example.com'
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        ASSIGN                                                   !0, $3
    4    10        FETCH_DIM_R                                      ~5      !0, 0
         11        CONCAT                                           ~6      'Test%3A+', ~5
         12        CONCAT                                           ~7      ~6, '%3Cbr%3E'
         13        ECHO                                                     ~7
    5    14        INIT_FCALL                                               'array_pop'
         15        SEND_REF                                                 !0
         16        DO_ICALL                                         $8      
         17        ASSIGN                                                   !1, $8
    6    18        CONCAT                                           ~10     'Target%3A+', !1
         19        CONCAT                                           ~11     ~10, '%3Cbr%3E'
         20        ECHO                                                     ~11
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.01 ms | 1395 KiB | 19 Q