3v4l.org

run code in 500+ PHP versions simultaneously
<?php $results = [ [ 'key' => 'Group', 'value' => '123', ], [ 'key' => 'clientId', 'value' => '1234', ], [ 'key' => 'Name', 'value' => 'ABC - This company\'s name', ] ]; $index = array_search('clientId', array_column($results, 'key')); if($index===false) { //error handling } var_dump($results[$index]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/rmip7
function name:  (null)
number of ops:  17
compiled vars:  !0 = $results, !1 = $index
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   18     1        INIT_FCALL                                                   'array_search'
          2        SEND_VAL                                                     'clientId'
          3        INIT_FCALL                                                   'array_column'
          4        SEND_VAR                                                     !0
          5        SEND_VAL                                                     'key'
          6        DO_ICALL                                             $3      
          7        SEND_VAR                                                     $3
          8        DO_ICALL                                             $4      
          9        ASSIGN                                                       !1, $4
   20    10        TYPE_CHECK                                        4          !1
         11      > JMPZ                                                         ~6, ->12
   24    12    >   INIT_FCALL                                                   'var_dump'
         13        FETCH_DIM_R                                          ~7      !0, !1
         14        SEND_VAL                                                     ~7
         15        DO_ICALL                                                     
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.9 ms | 2114 KiB | 16 Q