3v4l.org

run code in 300+ PHP versions simultaneously
<?php $links = array ( 0 => array ( 'rel' => 'advertisements', 'href' => 'https://api.teamsnap.com/v3/advertisements' ), 1 => array ( 'rel' => 'active_season_team', 'href' => 'https://api.teamsnap.com/v3/teams' ), 2 => array ( 'rel' => 'assignments', 'href' => 'https://api.teamsnap.com/v3/assignments' ), 3 => array ( 'rel' => 'availabilities', 'href' => 'https://api.teamsnap.com/v3/availabilities' ) ); if(($key = array_search('advertisements', array_column($links, 'rel'))) !== false) { echo $links[$key]['href']; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/YCMNU
function name:  (null)
number of ops:  16
compiled vars:  !0 = $links, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   26     1        INIT_FCALL                                               'array_search'
          2        SEND_VAL                                                 'advertisements'
          3        INIT_FCALL                                               'array_column'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 'rel'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ASSIGN                                           ~5      !1, $4
         10        TYPE_CHECK                                  1018          ~5
         11      > JMPZ                                                     ~6, ->15
   27    12    >   FETCH_DIM_R                                      ~7      !0, !1
         13        FETCH_DIM_R                                      ~8      ~7, 'href'
         14        ECHO                                                     ~8
   28    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.75 ms | 1394 KiB | 17 Q