3v4l.org

run code in 500+ PHP versions simultaneously
<?php function destruct(array $a, &...$results) { foreach ($results as $key => &$val) { $val = $a[$key]; } } destruct([1, 2, 3, 'b' => 'b'], $a, b: $b); var_dump($a, $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ia489n
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                                   'destruct'
          1        SEND_VAL                                                     <array>
          2        SEND_REF                                                     !0
          3        SEND_VAR_EX                                                  !1, 'b'
          4        CHECK_UNDEF_ARGS                                             
          5        DO_FCALL                                          1          
   10     6        INIT_FCALL                                                   'var_dump'
          7        SEND_VAR                                                     !0
          8        SEND_VAR                                                     !1
          9        DO_ICALL                                                     
         10      > RETURN                                                       1

Function destruct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/ia489n
function name:  destruct
number of ops:  10
compiled vars:  !0 = $a, !1 = $results, !2 = $val, !3 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV_VARIADIC                                        !1      
    4     2      > FE_RESET_RW                                          $4      !1, ->8
          3    > > FE_FETCH_RW                                          ~5      $4, !2, ->8
          4    >   ASSIGN                                                       !3, ~5
    5     5        FETCH_DIM_R                                          ~7      !0, !3
          6        ASSIGN                                                       !2, ~7
    4     7      > JMP                                                          ->3
          8    >   FE_FREE                                                      $4
    7     9      > RETURN                                                       null

End of function destruct

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
149.67 ms | 3408 KiB | 15 Q