3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.21 ms | 1386 KiB | 15 Q