3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( 'question' => 'text', 'items' => array ( '0' => array ( 'phrase' => 'text text', ), '1' => array ( 'phrase' => 'text text text', ), ), ); $array_object = new ArrayObject( $array, 0, "RecursiveArrayIterator" ); $iterator = new RecursiveIteratorIterator( $array_object->getIterator() ); foreach( $iterator as $key => $value ) { print_r( $iterator->getInnerIterator() ); // missing RecursiveArrayIterator Object of "items" }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/ZeSrS
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $array_object, !2 = $iterator, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   10     1        NEW                                              $6      'ArrayObject'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              0
          4        SEND_VAL_EX                                              'RecursiveArrayIterator'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
   11     7        NEW                                              $9      'RecursiveIteratorIterator'
          8        INIT_METHOD_CALL                                         !1, 'getIterator'
          9        DO_FCALL                                      0  $10     
         10        SEND_VAR_NO_REF_EX                                       $10
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $9
   14    13      > FE_RESET_R                                       $13     !2, ->22
         14    > > FE_FETCH_R                                       ~14     $13, !3, ->22
         15    >   ASSIGN                                                   !4, ~14
   15    16        INIT_FCALL                                               'print_r'
         17        INIT_METHOD_CALL                                         !2, 'getInnerIterator'
         18        DO_FCALL                                      0  $16     
         19        SEND_VAR                                                 $16
         20        DO_ICALL                                                 
   14    21      > JMP                                                      ->14
         22    >   FE_FREE                                                  $13
   16    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.03 ms | 1395 KiB | 15 Q