3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new ArrayObject([1, 2, 3]); foreach ($a as $key => &$value) { $value = $value + 10; } unset($value); var_dump($a);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 126) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/aBKtd
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'ArrayObject'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4      > FE_RESET_RW                                      $6      !0, ->10
          5    > > FE_FETCH_RW                                      ~7      $6, !1, ->10
          6    >   ASSIGN                                                   !2, ~7
    5     7        ADD                                              ~9      !1, 10
          8        ASSIGN                                                   !1, ~9
    4     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $6
    7    11        UNSET_CV                                                 !1
    9    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.05 ms | 1395 KiB | 15 Q