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 $bar = true; $foo = false; $wat = $foo OR $bar; echo $wat ."\n"; // WAT? doesn't print? if( false OR $bar ) echo "F | bar\n"; // OK if( $foo OR $bar ) echo "foo | bar\n"; // OK if( $wat ) echo "wat = F|T\n"; // WAT? doesn't print? var_dump( false OR true ); // OK: bool(true) $wat = false OR true; var_dump( $wat ); // WAT? bool(false)
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 = 13, Position 2 = 14
Branch analysis from position: 13
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
2 jumps found. (Code = 47) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 20
Branch analysis from position: 18
Branch analysis from position: 16
Branch analysis from position: 14
Branch analysis from position: 9
Branch analysis from position: 4
Branch analysis from position: 2
filename:       /in/NVaf6
function name:  (null)
number of ops:  30
compiled vars:  !0 = $bar, !1 = $foo, !2 = $wat
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > JMPZ                                                     <true>, ->2
          1    >   ECHO                                                     '1st+true%0A'
    3     2    > > JMPZ                                                     <true>, ->4
          3    >   ECHO                                                     '2nd+true%0A'
    5     4    >   ASSIGN                                                   !0, <true>
    6     5        ASSIGN                                                   !1, <false>
    9     6        ASSIGN                                           ~5      !2, !1
          7      > JMPNZ_EX                                         ~5      ~5, ->9
          8    >   BOOL                                             ~5      !0
   10     9    >   CONCAT                                           ~6      !2, '%0A'
         10        ECHO                                                     ~6
   11    11        BOOL                                             ~7      !0
         12      > JMPZ                                                     ~7, ->14
         13    >   ECHO                                                     'F+++%7C+bar%0A'
   12    14    > > JMPNZ_EX                                         ~8      !1, ->16
         15    >   BOOL                                             ~8      !0
         16    > > JMPZ                                                     ~8, ->18
         17    >   ECHO                                                     'foo+%7C+bar%0A'
   13    18    > > JMPZ                                                     !2, ->20
         19    >   ECHO                                                     'wat+%3D+F%7CT%0A'
   15    20    >   INIT_FCALL                                               'var_dump'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                                 
   16    23        ASSIGN                                           ~10     !2, <false>
         24      > JMPNZ_EX                                         ~10     ~10, ->26
         25    >   BOOL                                             ~10     <true>
   17    26    >   INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.66 ms | 1396 KiB | 15 Q