3v4l.org

run code in 500+ PHP versions simultaneously
<?php $header = array(array('Name','Position','Salary')); $data = array( array('John','Manager','30000'), array('Cindy','Associate','50000'), array('Paul','Staff','20000'), array('Mandy','Staff','100000') ); array_walk($data, function(&$value, &$key) use ($header) {$value = array_combine($header[0],$value);}); print_r($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ofele
function name:  (null)
number of ops:  12
compiled vars:  !0 = $header, !1 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
   10     2        INIT_FCALL                                                   'array_walk'
          3        SEND_REF                                                     !1
          4        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          5        BIND_LEXICAL                                                 ~4, !0
          6        SEND_VAL                                                     ~4
          7        DO_ICALL                                                     
   11     8        INIT_FCALL                                                   'print_r'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                                     
         11      > 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/ofele
function name:  {closure:/in/ofele:10}
number of ops:  10
compiled vars:  !0 = $value, !1 = $key, !2 = $header
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
          3        INIT_FCALL                                                   'array_combine'
          4        FETCH_DIM_R                                          ~3      !2, 0
          5        SEND_VAL                                                     ~3
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $4      
          8        ASSIGN                                                       !0, $4
          9      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.36 ms | 2486 KiB | 16 Q