3v4l.org

run code in 300+ PHP versions simultaneously
<?php const X = 'string'; function x(): array { return [X=>1]; } function y(): array { return ['a'=>1]; } $res = [...y(), ...x()];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RCsYZ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'X', 'string'
   13     1        INIT_FCALL                                               'y'
          2        DO_FCALL                                      0  $1      
          3        INIT_ARRAY                                       ~2      
          4        ADD_ARRAY_UNPACK                                 ~2      $1
          5        INIT_FCALL                                               'x'
          6        DO_FCALL                                      0  $3      
          7        ADD_ARRAY_UNPACK                                 ~2      $3
          8        ASSIGN                                                   !0, ~2
          9      > RETURN                                                   1

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RCsYZ
function name:  x
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_CONSTANT                                   ~0      'X'
          1        INIT_ARRAY                                       ~1      1, ~0
          2        VERIFY_RETURN_TYPE                                       ~1
          3      > RETURN                                                   ~1
    8     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function x

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

End of function y

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.46 ms | 1016 KiB | 15 Q