3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( array( 'week' => 26, '#orders_CA' => 0, 'cost_CA' => 0, '#orders_US' => 3, 'cost_US' => 18.99, '#orders_INTERNATIONAL' => 0, 'cost_INTERNATIONAL' => 0 ), array( 'week' => 26, '#orders_CA' => 0, 'cost_CA' => 0, '#orders_US' => 0, 'cost_US' => 0, '#orders_INTERNATIONAL' => 22, 'cost_INTERNATIONAL' => 32 ), ); $res = call_user_func_array('array_map', array_merge(array(function() { return array_sum(func_get_args()); }), $a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KuZ6i
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   23     1        INIT_FCALL                                               'array_map'
          2        INIT_FCALL                                               'array_merge'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FKuZ6i%3A23%240'
   25     4        INIT_ARRAY                                       ~4      ~3
          5        SEND_VAL                                                 ~4
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        SEND_ARRAY                                               $5
          9        CHECK_UNDEF_ARGS                                         
         10        DO_FCALL                                      0  $6      
   23    11        ASSIGN                                                   !1, $6
   25    12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FKuZ6i%3A23%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KuZ6i
function name:  {closure}
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'array_sum'
          1        FUNC_GET_ARGS                                    ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   25     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FKuZ6i%3A23%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.21 ms | 1395 KiB | 19 Q