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 RecursiveIteratorIterator(new RecursiveArrayIterator($data)); 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/GJU7N
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      'RecursiveIteratorIterator'
          2        NEW                                              $5      'RecursiveArrayIterator'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $5
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $4
   25     8        ECHO                                                     '%0A'
          9        INIT_FCALL                                               'implode'
         10        INIT_FCALL                                               'iterator_to_array'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        SEND_VAR                                                 $9
         14        DO_ICALL                                         $10     
         15        ECHO                                                     $10
   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                                         $11     
         22        SEND_VAR                                                 $11
         23        DO_ICALL                                         $12     
         24        ECHO                                                     $12
   28    25        ECHO                                                     '%0A'
   30    26      > FE_RESET_R                                       $13     !1, ->30
         27    > > FE_FETCH_R                                               $13, !2, ->30
   32    28    >   ECHO                                                     !2
   30    29      > JMP                                                      ->27
         30    >   FE_FREE                                                  $13
   33    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.78 ms | 1439 KiB | 15 Q