3v4l.org

run code in 300+ PHP versions simultaneously
<?php $model = array( 'gozhi' => 2, 'uzorong' => 1, 'ngangla' => 4, 'langthel' => 5 ); $data = array( 0 => array( 'gozhi' => 2, 'uzorong' => 1, 'ngangla' => 4, 'langthel' => 5 ), 1 => array( 'gozhi' => 5, 'uzorong' => 0, 'ngangla' => 3, 'langthel' => 2 ), 2 => array( 'gozhi' => 3, 'uzorong' => 0, 'ngangla' => 1, 'langthel' => 3 ), ); $keys = array_keys($model); $res = call_user_func_array('array_map', array_merge(array(function() { return array_sum(func_get_args()); }), $data)); var_dump(array_combine($keys, $res));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bhiAY
function name:  (null)
number of ops:  25
compiled vars:  !0 = $model, !1 = $data, !2 = $keys, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   31     2        INIT_FCALL                                               'array_keys'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !2, $6
   32     6        INIT_FCALL                                               'array_map'
          7        INIT_FCALL                                               'array_merge'
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FbhiAY%3A32%240'
   34     9        INIT_ARRAY                                       ~9      ~8
         10        SEND_VAL                                                 ~9
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $10     
         13        SEND_ARRAY                                               $10
         14        CHECK_UNDEF_ARGS                                         
         15        DO_FCALL                                      0  $11     
   32    16        ASSIGN                                                   !3, $11
   36    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'array_combine'
         19        SEND_VAR                                                 !2
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $13     
         22        SEND_VAR                                                 $13
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FbhiAY%3A32%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.2 ms | 1388 KiB | 25 Q