3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = "asdf"; $value = array(); if ((is_array($value) && in_array(strval($key), $value)) || (strval($key) == strval($value))) { echo "true"; } else { echo "false"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
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: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 10
filename:       /in/tI18I
function name:  (null)
number of ops:  20
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'asdf'
    4     1        ASSIGN                                                   !1, <array>
    6     2        TYPE_CHECK                                  128  ~4      !1
          3      > JMPZ_EX                                          ~4      ~4, ->10
          4    >   INIT_FCALL                                               'in_array'
          5        CAST                                          6  ~5      !0
          6        SEND_VAL                                                 ~5
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        BOOL                                             ~4      $6
         10    > > JMPNZ_EX                                         ~4      ~4, ->15
         11    >   CAST                                          6  ~7      !0
         12        CAST                                          6  ~8      !1
         13        IS_EQUAL                                         ~9      ~7, ~8
         14        BOOL                                             ~4      ~9
         15    > > JMPZ                                                     ~4, ->18
    7    16    >   ECHO                                                     'true'
         17      > JMP                                                      ->19
    9    18    >   ECHO                                                     'false'
   10    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.11 ms | 1395 KiB | 15 Q