3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testArray = array( array( "id" => "id 1", "value1" => "Something", "anotherValue" => "Else" ), array( "id" => "id 2", "value1" => "Something", "anotherValue" => "Else" ), array( "id" => "id 3", "value1" => "Something", "anotherValue" => "Else" ), array( "id" => "id 4", "value1" => "Something", "anotherValue" => "Else" ), array( "id" => "id 5", "value1" => "Something", "anotherValue" => "Else" ), array( "id" => "id 6", "value1" => "Something", "anotherValue" => "Else" ) ); $instagram2 = array_map(function($a){return array($a['id']=> $a);}, $testArray); $i3 = array_map(function($a){return $a;}, $instagram2); print_r($i3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tcKc7
function name:  (null)
number of ops:  17
compiled vars:  !0 = $testArray, !1 = $instagram2, !2 = $i3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   35     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtcKc7%3A35%240'
          3        SEND_VAL                                                 ~4
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
   36     7        INIT_FCALL                                               'array_map'
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtcKc7%3A36%241'
          9        SEND_VAL                                                 ~7
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !2, $8
   37    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FtcKc7%3A35%240

Function %00%7Bclosure%7D%2Fin%2FtcKc7%3A36%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tcKc7
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   RECV                                             !0      
          1      > RETURN                                                   !0
          2*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtcKc7%3A36%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.47 ms | 1396 KiB | 17 Q