3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'a' => 1, 'b' => 2 ); $privileges = array_map(function ($value, $key) { return array('name' => $key, 'value' => $value); }, $a, array_keys($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qkPs8
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $privileges
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FqkPs8%3A8%240'
   10     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      
    8    10        ASSIGN                                                   !1, $5
   10    11      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FqkPs8%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.67 ms | 1395 KiB | 17 Q