3v4l.org

run code in 300+ PHP versions simultaneously
<?php $agent = 'test+agent'; $agent = split('\+', $agent); $first = substr($agent[0],0,1); $last = $agent[1]; $agent= $first.$last; echo $agent;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lsTYK
function name:  (null)
number of ops:  19
compiled vars:  !0 = $agent, !1 = $first, !2 = $last
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test%2Bagent'
    4     1        INIT_FCALL_BY_NAME                                       'split'
          2        SEND_VAL_EX                                              '%5C%2B'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !0, $4
    5     6        INIT_FCALL                                               'substr'
          7        FETCH_DIM_R                                      ~6      !0, 0
          8        SEND_VAL                                                 ~6
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
    6    13        FETCH_DIM_R                                      ~9      !0, 1
         14        ASSIGN                                                   !2, ~9
    7    15        CONCAT                                           ~11     !1, !2
         16        ASSIGN                                                   !0, ~11
    8    17        ECHO                                                     !0
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.56 ms | 1394 KiB | 15 Q