3v4l.org

run code in 300+ PHP versions simultaneously
<?php function SplitEmailAddress($address) { $pos = strpos($address, ':'); return array( 'user' => substr($address, 0, $pos), 'domain' => substr($address, $pos+1), ); } echo SplitEmailAddress('user@example.com');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rXhDS
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'splitemailaddress'
          1        SEND_VAL                                                 'user%40example.com'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function splitemailaddress:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rXhDS
function name:  SplitEmailAddress
number of ops:  20
compiled vars:  !0 = $address, !1 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%3A'
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
    5     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $4      
         11        INIT_ARRAY                                       ~5      $4, 'user'
    6    12        INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !0
         14        ADD                                              ~6      !1, 1
         15        SEND_VAL                                                 ~6
         16        DO_ICALL                                         $7      
         17        ADD_ARRAY_ELEMENT                                ~5      $7, 'domain'
         18      > RETURN                                                   ~5
    8    19*     > RETURN                                                   null

End of function splitemailaddress

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.89 ms | 1389 KiB | 18 Q