3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($arr) { return iterator_to_array( new RecursiveIteratorIterator( new RecursiveArrayIterator($arr) ), false ); } var_dump([1,2,3,4,[5,6,[7],8]]); var_dump([new stdClass, new stdClass]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OgKVX
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                                 
   13     3        INIT_FCALL                                               'var_dump'
          4        NEW                                              $1      'stdClass'
          5        DO_FCALL                                      0          
          6        INIT_ARRAY                                       ~3      $1
          7        NEW                                              $4      'stdClass'
          8        DO_FCALL                                      0          
          9        ADD_ARRAY_ELEMENT                                ~3      $4
         10        SEND_VAL                                                 ~3
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OgKVX
function name:  test
number of ops:  13
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'iterator_to_array'
    5     2        NEW                                              $1      'RecursiveIteratorIterator'
    6     3        NEW                                              $2      'RecursiveArrayIterator'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $2
          7        DO_FCALL                                      0          
          8        SEND_VAR                                                 $1
    8     9        SEND_VAL                                                 <false>
         10        DO_ICALL                                         $5      
         11      > RETURN                                                   $5
   10    12*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.53 ms | 1395 KiB | 17 Q