3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 10 => [ 'fieldId' => 'OR', 'type' => 'T', 'value' => 'Pos', ], 11 => [ 'fieldId' => 'ORStreet', 'type' => 'TEXT', 'value' => 'Postbus 52', ], 12 => [ 'fieldId' => 'OR', 'type' => 'T', 'value' => 'Pos', ] ]; $index = array_flip(array_map(function($val){ return $val["fieldId"]; }, $arr)); echo $index["ORStreet"];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1eLOG
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr, !1 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'array_flip'
          2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F1eLOG%3A20%240'
   22     4        SEND_VAL                                                 ~3
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
   20     9        ASSIGN                                                   !1, $5
   23    10        FETCH_DIM_R                                      ~7      !1, 'ORStreet'
         11        ECHO                                                     ~7
         12      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2F1eLOG%3A20%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.67 ms | 1399 KiB | 17 Q