3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_url = 'current.sub.meh.com'; $stage_url = 'foo.stage.it'; $current_sub_domain = strtok( $current_url, '.' ); $stage_url = "{$current_sub_domain}.{$stage_url}"; echo $stage_url;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7VUFM
function name:  (null)
number of ops:  13
compiled vars:  !0 = $current_url, !1 = $stage_url, !2 = $current_sub_domain
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'current.sub.meh.com'
    4     1        ASSIGN                                                   !1, 'foo.stage.it'
    6     2        INIT_FCALL                                               'strtok'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '.'
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    7     7        ROPE_INIT                                     3  ~8      !2
          8        ROPE_ADD                                      1  ~8      ~8, '.'
          9        ROPE_END                                      2  ~7      ~8, !1
         10        ASSIGN                                                   !1, ~7
    9    11        ECHO                                                     !1
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.13 ms | 1394 KiB | 15 Q