3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.69 ms | 1395 KiB | 15 Q