3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('Zero', 'name'=>'Adil', 'address' => array( 'city'=>'Dubai', 'tel' => array('int' => 971, 'tel'=>12345487)), '' => 'nothing'); $iterator = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($arr)); var_dump(count(iterator_to_array($iterator,true)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qh34V
function name:  (null)
number of ops:  17
compiled vars:  !0 = $arr, !1 = $iterator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     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
    5     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'iterator_to_array'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $8      
         13        COUNT                                            ~9      $8
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.35 ms | 1394 KiB | 17 Q