3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr =array("a" => "banana","apple" => "fruit",'b' => "apple"); If(isset($arr["apple"]) || array_search("apple", $arr)){ Echo "true"; }Else{ Echo "false"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/65jSS
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      !0, 'apple'
          2      > JMPNZ_EX                                         ~2      ~2, ->8
          3    >   INIT_FCALL                                               'array_search'
          4        SEND_VAL                                                 'apple'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        BOOL                                             ~2      $3
          8    > > JMPZ                                                     ~2, ->11
    6     9    >   ECHO                                                     'true'
    5    10      > JMP                                                      ->12
    8    11    >   ECHO                                                     'false'
    9    12    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.72 ms | 1009 KiB | 14 Q