3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 8, 2, 10, 11, 19, 13, 10 ); $arr = array_map(function($index, $value) { return array($index, $value); }, $data, array_keys($data)); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RvqgK
function name:  (null)
number of ops:  15
compiled vars:  !0 = $data, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRvqgK%3A7%240'
    9     3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
          5        INIT_FCALL                                               'array_keys'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
    7    10        ASSIGN                                                   !1, $5
   11    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FRvqgK%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RvqgK
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $index, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        INIT_ARRAY                                       ~2      !0
          3        ADD_ARRAY_ELEMENT                                ~2      !1
          4      > RETURN                                                   ~2
    9     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FRvqgK%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.25 ms | 1395 KiB | 19 Q