3v4l.org

run code in 300+ PHP versions simultaneously
<?php $headerShown = false; // Pretend this is your while loop for($i = 0; $i <= 10; $i++){ // Pretend this is your condition if($i > 5){ if(!$headerShown){ echo '<h2>Header</header>', PHP_EOL; $headerShown = true; } echo $i, PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
Branch analysis from position: 3
Branch analysis from position: 10
Branch analysis from position: 12
filename:       /in/EtnV2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $headerShown, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <false>
    6     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->13
    9     3    >   IS_SMALLER                                               5, !1
          4      > JMPZ                                                     ~4, ->12
   11     5    >   BOOL_NOT                                         ~5      !0
          6      > JMPZ                                                     ~5, ->10
   12     7    >   ECHO                                                     '%3Ch2%3EHeader%3C%2Fheader%3E'
          8        ECHO                                                     '%0A'
   13     9        ASSIGN                                                   !0, <true>
   16    10    >   ECHO                                                     !1
         11        ECHO                                                     '%0A'
    6    12    >   PRE_INC                                                  !1
         13    >   IS_SMALLER_OR_EQUAL                                      !1, 10
         14      > JMPNZ                                                    ~8, ->3
   18    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.12 ms | 1007 KiB | 13 Q