3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getDomain() { return 'example.com'; } function getSubDomains() { return array('www.example.com'); } function register($domainKeys, $subdomains) { $domains = (array) getDomain(); if ($subdomains == null) { $domains = array_merge($domains, getSubdomains()); } else { $domains = array_merge($domains, $subdomains); } return $domains; } var_dump(register(null, []));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lCtNi
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'register'
          2        SEND_VAL                                                 null
          3        SEND_VAL                                                 <array>
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function getdomain:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lCtNi
function name:  getDomain
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > RETURN                                                   'example.com'
    4     1*     > RETURN                                                   null

End of function getdomain

Function getsubdomains:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lCtNi
function name:  getSubDomains
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   <array>
    7     1*     > RETURN                                                   null

End of function getsubdomains

Function register:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lCtNi
function name:  register
number of ops:  23
compiled vars:  !0 = $domainKeys, !1 = $subdomains, !2 = $domains
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        INIT_FCALL                                               'getdomain'
          3        DO_FCALL                                      0  $3      
          4        CAST                                          7  ~4      $3
          5        ASSIGN                                                   !2, ~4
   10     6        IS_EQUAL                                                 !1, null
          7      > JMPZ                                                     ~6, ->16
   11     8    >   INIT_FCALL                                               'array_merge'
          9        SEND_VAR                                                 !2
         10        INIT_FCALL                                               'getsubdomains'
         11        DO_FCALL                                      0  $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !2, $8
         15      > JMP                                                      ->21
   13    16    >   INIT_FCALL                                               'array_merge'
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $10     
         20        ASSIGN                                                   !2, $10
   15    21    > > RETURN                                                   !2
   16    22*     > RETURN                                                   null

End of function register

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.8 ms | 1403 KiB | 20 Q