3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 0 => array( 0 => 1, ), 1 => array( 0 => 2, ), 2 => array( 0 => 3, 1 => 4, 2 => 5, ), 3 => array( 0 => 6, ), 4 => array( 0 => 7, ), ); $it = (new RecursiveArrayIterator($data)); var_dump($it); echo PHP_EOL, implode(iterator_to_array($it)); //745 instead of 1234567 echo PHP_EOL, implode(iterator_to_array($it, true)); //745 instead of 1234567 echo PHP_EOL ; foreach($it as $v) { echo $v ; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/6hegj
function name:  (null)
number of ops:  32
compiled vars:  !0 = $data, !1 = $it, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   23     1        NEW                                              $4      'RecursiveArrayIterator'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   24     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   25     8        ECHO                                                     '%0A'
          9        INIT_FCALL                                               'implode'
         10        INIT_FCALL                                               'iterator_to_array'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $8      
         13        SEND_VAR                                                 $8
         14        DO_ICALL                                         $9      
         15        ECHO                                                     $9
   26    16        ECHO                                                     '%0A'
         17        INIT_FCALL                                               'implode'
         18        INIT_FCALL                                               'iterator_to_array'
         19        SEND_VAR                                                 !1
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $10     
         22        SEND_VAR                                                 $10
         23        DO_ICALL                                         $11     
         24        ECHO                                                     $11
   28    25        ECHO                                                     '%0A'
   30    26      > FE_RESET_R                                       $12     !1, ->30
         27    > > FE_FETCH_R                                               $12, !2, ->30
   32    28    >   ECHO                                                     !2
   30    29      > JMP                                                      ->27
         30    >   FE_FREE                                                  $12
   33    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.27 ms | 1396 KiB | 19 Q