3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_2 = [ [ 1, 2, 7 ], [ 4, 5, 6 ] ]; $t = 0; array_map(function($v) use (&$t){ $t += array_sum($v);}, $array_2); echo $t;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WQSW0
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array_2, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, 0
   16     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          4        BIND_LEXICAL                                             ~4, !1
          5        SEND_VAL                                                 ~4
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   17     8        ECHO                                                     !1
   18     9      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WQSW0
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'array_sum'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN_OP                                     1          !1, $2
          6      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.16 ms | 1005 KiB | 15 Q