3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = "asdf"; $value = array("asdf"); if ((is_array($value) && in_array(strval($key), $value)) || (is_string($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 = 18
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 18
Branch analysis from position: 10
filename:       /in/qbDsd
function name:  (null)
number of ops:  23
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, ->18
         11    >   TYPE_CHECK                                   64  ~7      !1
         12      > JMPZ_EX                                          ~7      ~7, ->17
         13    >   CAST                                          6  ~8      !0
         14        CAST                                          6  ~9      !1
         15        IS_EQUAL                                         ~10     ~8, ~9
         16        BOOL                                             ~7      ~10
         17    >   BOOL                                             ~4      ~7
         18    > > JMPZ                                                     ~4, ->21
    7    19    >   ECHO                                                     'true'
         20      > JMP                                                      ->22
    9    21    >   ECHO                                                     'false'
   10    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.84 ms | 1395 KiB | 15 Q