3v4l.org

run code in 500+ PHP versions simultaneously
<?php $people = [ 0 => [ 'name' => 'John', 'fav_color' => 'green', ], 1 => [ 'name' => 'Samuel', 'fav_color' => 'blue', ], ]; $found_key = array_search('green', array_column($people, 'fav_color')); if ($found_key !== false) { print_r("Y"); } else { print_r("N"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gqmo2
function name:  (null)
number of ops:  20
compiled vars:  !0 = $people, !1 = $found_key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   13     1        INIT_FCALL                                                   'array_search'
          2        SEND_VAL                                                     'green'
          3        INIT_FCALL                                                   'array_column'
          4        SEND_VAR                                                     !0
          5        SEND_VAL                                                     'fav_color'
          6        DO_ICALL                                             $3      
          7        SEND_VAR                                                     $3
          8        DO_ICALL                                             $4      
          9        ASSIGN                                                       !1, $4
   15    10        TYPE_CHECK                                      1018          !1
         11      > JMPZ                                                         ~6, ->16
   16    12    >   INIT_FCALL                                                   'print_r'
         13        SEND_VAL                                                     'Y'
         14        DO_ICALL                                                     
   15    15      > JMP                                                          ->19
   18    16    >   INIT_FCALL                                                   'print_r'
         17        SEND_VAL                                                     'N'
         18        DO_ICALL                                                     
   19    19    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129 ms | 479 KiB | 10 Q