3v4l.org

run code in 300+ PHP versions simultaneously
<?php if( true OR false ) echo "yes\n"; // OK if( false OR true ) echo "yes\n"; // OK $foo = true; $bar = false; $wat = $foo OR $bar; echo $wat ."\n"; // OK: 1 $wat = $bar OR $foo; echo $wat ."\n"; // WAT?
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 2
Branch analysis from position: 1
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
Branch analysis from position: 9
Branch analysis from position: 4
Branch analysis from position: 2
filename:       /in/TM6Rs
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo, !1 = $bar, !2 = $wat
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > JMPZ                                                     <true>, ->2
          1    >   ECHO                                                     'yes%0A'
    4     2    > > JMPZ                                                     <true>, ->4
          3    >   ECHO                                                     'yes%0A'
    6     4    >   ASSIGN                                                   !0, <true>
    7     5        ASSIGN                                                   !1, <false>
    9     6        ASSIGN                                           ~5      !2, !0
          7      > JMPNZ_EX                                         ~5      ~5, ->9
          8    >   BOOL                                             ~5      !1
   10     9    >   CONCAT                                           ~6      !2, '%0A'
         10        ECHO                                                     ~6
   12    11        ASSIGN                                           ~7      !2, !1
         12      > JMPNZ_EX                                         ~7      ~7, ->14
         13    >   BOOL                                             ~7      !0
   13    14    >   CONCAT                                           ~8      !2, '%0A'
         15        ECHO                                                     ~8
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.35 ms | 1393 KiB | 13 Q