3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(&$a) { return $a; } $ar = array('a','b','c'); foreach (array_keys($ar) as $key) { $y = &f($ar[$key]); $z[] = &$y; } var_dump($z);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/eeds3
function name:  (null)
number of ops:  19
compiled vars:  !0 = $ar, !1 = $key, !2 = $y, !3 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4      > FE_RESET_R                                       $6      $5, ->14
          5    > > FE_FETCH_R                                               $6, !1, ->14
    7     6    >   INIT_FCALL                                               'f'
          7        FETCH_DIM_W                                      $7      !0, !1
          8        SEND_REF                                                 $7
          9        DO_FCALL                                      0  $8      
         10        ASSIGN_REF                                               !2, $8
    8    11        FETCH_DIM_W                                      $10     !3
         12        ASSIGN_REF                                               $10, !2
    6    13      > JMP                                                      ->5
         14    >   FE_FREE                                                  $6
   10    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eeds3
function name:  f
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1      > RETURN                                                   !0
          2*     > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.11 ms | 1398 KiB | 18 Q