3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = [new stdClass, new stdClass]; var_dump(new \RecursiveArrayIterator($r)); var_dump( iterator_to_array( new \RecursiveIteratorIterator(new \RecursiveArrayIterator($r)), false) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AmOXb
function name:  (null)
number of ops:  27
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~3      $1
          3        NEW                                              $4      'stdClass'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~3      $4
          6        ASSIGN                                                   !0, ~3
    3     7        INIT_FCALL                                               'var_dump'
          8        NEW                                              $7      'RecursiveArrayIterator'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11        SEND_VAR                                                 $7
         12        DO_ICALL                                                 
    4    13        INIT_FCALL                                               'var_dump'
    5    14        INIT_FCALL                                               'iterator_to_array'
    6    15        NEW                                              $10     'RecursiveIteratorIterator'
         16        NEW                                              $11     'RecursiveArrayIterator'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0          
         19        SEND_VAR_NO_REF_EX                                       $11
         20        DO_FCALL                                      0          
         21        SEND_VAR                                                 $10
    7    22        SEND_VAL                                                 <false>
         23        DO_ICALL                                         $14     
         24        SEND_VAR                                                 $14
         25        DO_ICALL                                                 
    8    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.54 ms | 1387 KiB | 17 Q