3v4l.org

run code in 300+ PHP versions simultaneously
<?php if( true OR false ) echo "1st true\n"; // OK if( false OR true ) echo "2nd true\n"; // OK $foo = true; $bar = false; $wat = $foo OR $bar; echo $wat ."\n"; // OK: 1 if( $wat ) echo "T | F\n"; $wat = $bar OR $foo; echo $wat ."\n"; // WAT? if( $wat ) echo "F | T\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 = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 16
Branch analysis from position: 13
Branch analysis from position: 9
Branch analysis from position: 4
Branch analysis from position: 2
filename:       /in/n5JQn
function name:  (null)
number of ops:  21
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                                                     '1st+true%0A'
    4     2    > > JMPZ                                                     <true>, ->4
          3    >   ECHO                                                     '2nd+true%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
   11    11      > JMPZ                                                     !2, ->13
         12    >   ECHO                                                     'T+%7C+F%0A'
   13    13    >   ASSIGN                                           ~7      !2, !1
         14      > JMPNZ_EX                                         ~7      ~7, ->16
         15    >   BOOL                                             ~7      !0
   14    16    >   CONCAT                                           ~8      !2, '%0A'
         17        ECHO                                                     ~8
   15    18      > JMPZ                                                     !2, ->20
         19    >   ECHO                                                     'F+%7C+T%0A'
         20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.21 ms | 1394 KiB | 13 Q