3v4l.org

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

Class I:
Function current:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00Z3F
function name:  current
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_STATIC_METHOD_CALL                                  'current'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
    8     3*     > RETURN                                                   null

End of function current

End of class I.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.23 ms | 998 KiB | 14 Q