3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.25 ms | 1399 KiB | 19 Q