3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['0' => 1, '1' => 2, '2' => 3]; $b = ['0' => 4, '1' => 5, '2' => 6]; $newArray = array_map('combine',array_map(null, $a, $b)); function combine($n){ return array_combine(array('a','b'),$n); } print_r($newArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okML7
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $newArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'array_map'
          3        SEND_VAL                                                 'combine'
          4        INIT_FCALL                                               'array_map'
          5        SEND_VAL                                                 null
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !2, $6
   13    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function combine:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okML7
function name:  combine
number of ops:  7
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'array_combine'
          2        SEND_VAL                                                 <array>
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
   11     6*     > RETURN                                                   null

End of function combine

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.16 ms | 1435 KiB | 16 Q