3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['id' => 18460, 'field_id' => 14, 'parent_id' => 165, 'custom_tab_field_id' => 17775, 'status' => 0, 'field_type' => 0], ['id' => 18460, 'field_id' => 2, 'parent_id' => 165, 'custom_tab_field_id' => 17776, 'status' => 0, 'field_type' => 2], ['id' => 18460, 'field_id' => 14, 'parent_id' => 165, 'custom_tab_field_id' => 17777, 'status' => 2, 'field_type' => 2], ]; $findKey = 'custom_tab_field_id'; $getKey = 'status'; $findVal = 17777; $arrKeyValue = array_column($array,$getKey,$findKey); $status = $arrKeyValue[$findVal]; var_dump($status);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SnVM4
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array, !1 = $findKey, !2 = $getKey, !3 = $findVal, !4 = $arrKeyValue, !5 = $status
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, 'custom_tab_field_id'
    9     2        ASSIGN                                                   !2, 'status'
   10     3        ASSIGN                                                   !3, 17777
   12     4        INIT_FCALL                                               'array_column'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !2
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $10     
          9        ASSIGN                                                   !4, $10
   14    10        FETCH_DIM_R                                      ~12     !4, !3
         11        ASSIGN                                                   !5, ~12
   15    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !5
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.85 ms | 998 KiB | 15 Q