3v4l.org

run code in 300+ PHP versions simultaneously
<?php $places = array((object)array('PlaceId' => 837, 'Name' => 'United Arab Emirates', 'Type' => 'Country'), (object)array('PlaceId' => 838, 'Name' => 'Afghanistan', 'Type' => 'Country'), (object)array('PlaceId' => 839, 'Name' => 'Antigua and Barbuda', 'Type' => 'Country') ); if (($k = array_search(837, array_column($places, 'PlaceId'))) !== false) { print_r($places[$k]); } else { echo "Not found!"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qH2eC
function name:  (null)
number of ops:  25
compiled vars:  !0 = $places, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~2      <array>
          1        INIT_ARRAY                                       ~3      ~2
    4     2        CAST                                          8  ~4      <array>
          3        ADD_ARRAY_ELEMENT                                ~3      ~4
    5     4        CAST                                          8  ~5      <array>
          5        ADD_ARRAY_ELEMENT                                ~3      ~5
    3     6        ASSIGN                                                   !0, ~3
    8     7        INIT_FCALL                                               'array_search'
          8        SEND_VAL                                                 837
          9        INIT_FCALL                                               'array_column'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 'PlaceId'
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                         $8      
         15        ASSIGN                                           ~9      !1, $8
         16        TYPE_CHECK                                  1018          ~9
         17      > JMPZ                                                     ~10, ->23
    9    18    >   INIT_FCALL                                               'print_r'
         19        FETCH_DIM_R                                      ~11     !0, !1
         20        SEND_VAL                                                 ~11
         21        DO_ICALL                                                 
    8    22      > JMP                                                      ->24
   12    23    >   ECHO                                                     'Not+found%21'
   13    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.68 ms | 1012 KiB | 16 Q