3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.95 ms | 1395 KiB | 15 Q