3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array('item1' => 'object1', 'item2' => 'object2', 'item-n' => 'object-n'); $output = implode(', ', array_map(function ($v, $k) { return $k . '=' . $v; }, $input, array_keys($input))); print_r($input, true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DGN5P
function name:  (null)
number of ops:  20
compiled vars:  !0 = $input, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C+'
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FDGN5P%3A3%240'
          5        SEND_VAL                                                 ~3
          6        SEND_VAR                                                 !0
          7        INIT_FCALL                                               'array_keys'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                         $6      
         14        ASSIGN                                                   !1, $6
    5    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FDGN5P%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.85 ms | 1387 KiB | 21 Q