3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr[] = array("id" => 11, "name" => "First"); $arr[] = array("id" => 52, "name" => "Second"); $arr[] = array("id" => 6, "name" => "Third"); $arr[] = array("id" => 43, "name" => "Fourth"); $find = 43; var_export( array_column($arr, 'name', 'id')[$find] ?? null );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kYBTj
function name:  (null)
number of ops:  21
compiled vars:  !0 = $arr, !1 = $find
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN_DIM                                                   !0
          1        OP_DATA                                                      <array>
    5     2        ASSIGN_DIM                                                   !0
          3        OP_DATA                                                      <array>
    6     4        ASSIGN_DIM                                                   !0
          5        OP_DATA                                                      <array>
    7     6        ASSIGN_DIM                                                   !0
          7        OP_DATA                                                      <array>
    9     8        ASSIGN                                                       !1, 43
   10     9        INIT_FCALL                                                   'var_export'
   11    10        INIT_FCALL                                                   'array_column'
         11        SEND_VAR                                                     !0
         12        SEND_VAL                                                     'name'
         13        SEND_VAL                                                     'id'
         14        DO_ICALL                                             $7      
         15        FETCH_DIM_IS                                         ~8      $7, !1
         16        COALESCE                                             ~9      ~8
         17        QM_ASSIGN                                            ~9      null
         18        SEND_VAL                                                     ~9
   10    19        DO_ICALL                                                     
   12    20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
202.72 ms | 1892 KiB | 15 Q