3v4l.org

run code in 300+ PHP versions simultaneously
<?php function merge(mixed $one, mixed $two): array { return array_merge($one, $two); } function spread(mixed $one, mixed $two): array { return [...$one, ...$two]; } spread(null, ['foo']); //merge(null, ['foo']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2YVCi
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'spread'
          1        SEND_VAL                                                 null
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0          
   14     4      > RETURN                                                   1

Function merge:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2YVCi
function name:  merge
number of ops:  10
compiled vars:  !0 = $one, !1 = $two
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'array_merge'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6        VERIFY_RETURN_TYPE                                       $2
          7      > RETURN                                                   $2
    6     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function merge

Function spread:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2YVCi
function name:  spread
number of ops:  9
compiled vars:  !0 = $one, !1 = $two
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        INIT_ARRAY                                       ~2      
          3        ADD_ARRAY_UNPACK                                 ~2      !0
          4        ADD_ARRAY_UNPACK                                 ~2      !1
          5        VERIFY_RETURN_TYPE                                       ~2
          6      > RETURN                                                   ~2
   11     7*       VERIFY_RETURN_TYPE                                       
          8*     > RETURN                                                   null

End of function spread

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.15 ms | 1016 KiB | 15 Q