3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [11, 'f' => 22, 33]; $a = array_map(function ($v) { return "v$v " ; }, $arr); print_r($a); $arr = ['key1' => 1, 'key2' => 3, 'key3' => 3]; $a = array_map(function ($v) { return "v$v " ; }, $arr); print_r($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gtL6E
function name:  (null)
number of ops:  21
compiled vars:  !0 = $arr, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FgtL6E%3A4%240'
    6     3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
    4     6        ASSIGN                                                   !1, $4
    7     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    9    10        ASSIGN                                                   !0, <array>
   10    11        INIT_FCALL                                               'array_map'
         12        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FgtL6E%3A10%241'
   12    13        SEND_VAL                                                 ~8
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $9      
   10    16        ASSIGN                                                   !1, $9
   13    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FgtL6E%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gtL6E
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ROPE_INIT                                     3  ~2      'v'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '+'
          4      > RETURN                                                   ~1
    6     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FgtL6E%3A4%240

Function %00%7Bclosure%7D%2Fin%2FgtL6E%3A10%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gtL6E
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ROPE_INIT                                     3  ~2      'v'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '+'
          4      > RETURN                                                   ~1
   12     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FgtL6E%3A10%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
196.6 ms | 1396 KiB | 17 Q