3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( true && false || false, true && false || true, true && true || false, true && true || true, false && false || false, false && false || true, false && true || false, false && true || true ); foreach($tests as $i => $test){ echo "Test $i: " . ($test?"True":"False") . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 15
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/sZPVH
function name:  (null)
number of ops:  17
compiled vars:  !0 = $tests, !1 = $test, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1      > FE_RESET_R                                       $4      !0, ->15
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->15
          3    >   ASSIGN                                                   !2, ~5
   15     4        ROPE_INIT                                     3  ~8      'Test+'
          5        ROPE_ADD                                      1  ~8      ~8, !2
          6        ROPE_END                                      2  ~7      ~8, '%3A+'
          7      > JMPZ                                                     !1, ->10
          8    >   QM_ASSIGN                                        ~10     'True'
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~10     'False'
         11    >   CONCAT                                           ~11     ~7, ~10
         12        CONCAT                                           ~12     ~11, '%0A'
         13        ECHO                                                     ~12
   14    14      > JMP                                                      ->2
         15    >   FE_FREE                                                  $4
   16    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.05 ms | 1398 KiB | 13 Q