3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serviceNames = array( 0 => array( 'language' => 'en', 'value' => 'something', 'type' => 'name', ), 1 => array( 'language' => 'fi', 'value' => 'jotain', 'type' => 'name', ), 2 => array( 'language' => 'sv', 'value' => 'nĂ¥gonting', 'type' => 'name', ), ); $key = array_search('en', array_column($serviceNames, 'language')); echo $serviceNames[$key]['value'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/URQJV
function name:  (null)
number of ops:  14
compiled vars:  !0 = $serviceNames, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'array_search'
          2        SEND_VAL                                                 'en'
          3        INIT_FCALL                                               'array_column'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 'language'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
   21    10        FETCH_DIM_R                                      ~6      !0, !1
         11        FETCH_DIM_R                                      ~7      ~6, 'value'
         12        ECHO                                                     ~7
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.47 ms | 1010 KiB | 15 Q