3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.8 ms | 1395 KiB | 17 Q