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 = $bar OR $foo; echo $wat ."\n"; // OK: 1 if( $wat ) echo "wat = T|F\n"; $wat = $foo || $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 || 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 = 12, Position 2 = 13
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 25
Branch analysis from position: 23
Branch analysis from position: 21
Branch analysis from position: 15
Branch analysis from position: 13
Branch analysis from position: 9
Branch analysis from position: 4
Branch analysis from position: 2
filename:       /in/3qsRE
function name:  (null)
number of ops:  35
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>
    8     6        ASSIGN                                           ~5      !2, !0
          7      > JMPNZ_EX                                         ~5      ~5, ->9
          8    >   BOOL                                             ~5      !1
    9     9    >   CONCAT                                           ~6      !2, '%0A'
         10        ECHO                                                     ~6
   10    11      > JMPZ                                                     !2, ->13
         12    >   ECHO                                                     'wat+%3D+T%7CF%0A'
   12    13    > > JMPNZ_EX                                         ~7      !1, ->15
         14    >   BOOL                                             ~7      !0
         15    >   ASSIGN                                                   !2, ~7
   13    16        CONCAT                                           ~9      !2, '%0A'
         17        ECHO                                                     ~9
   14    18        BOOL                                             ~10     !0
         19      > JMPZ                                                     ~10, ->21
         20    >   ECHO                                                     'F+++%7C+bar%0A'
   15    21    > > JMPNZ_EX                                         ~11     !1, ->23
         22    >   BOOL                                             ~11     !0
         23    > > JMPZ                                                     ~11, ->25
         24    >   ECHO                                                     'foo+%7C+bar%0A'
   16    25    > > JMPZ                                                     !2, ->27
         26    >   ECHO                                                     'wat+%3D+F%7CT%0A'
   18    27    >   INIT_FCALL                                               'var_dump'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                                 
   19    30        ASSIGN                                                   !2, <true>
   20    31        INIT_FCALL                                               'var_dump'
         32        SEND_VAR                                                 !2
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.72 ms | 1392 KiB | 15 Q