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
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i1HQC
function name:  (null)
number of ops:  26
compiled vars:  !0 = $data, !1 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   23     1        NEW                                              $3      'RecursiveIteratorIterator'
          2        NEW                                              $4      'RecursiveArrayIterator'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $4
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $3
   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
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.47 ms | 1395 KiB | 17 Q