3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 10; $i >= 0; --$i){ if ($i == ($i < 1)){ $msg = 'really'; }else if ($i == ($i < 3)) { $msg = 'quite bad'; }else if ($i == ($i < 5)) { $msg = 'pay attention'; }else if ($i == ($i <= 9)){ $msg = 'quite good'; }else if ($i == ($i <= 10)){ $msg = 'congrat'; }else{ $msg = 'Oops'; } echo $i.' '.$msg . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 2
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 2
Branch analysis from position: 35
Branch analysis from position: 2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 2
Branch analysis from position: 35
Branch analysis from position: 2
filename:       /in/AY9Je
function name:  (null)
number of ops:  36
compiled vars:  !0 = $i, !1 = $msg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 10
          1      > JMP                                                      ->33
    4     2    >   IS_SMALLER                                       ~3      !0, 1
          3        IS_EQUAL                                                 !0, ~3
          4      > JMPZ                                                     ~4, ->7
    5     5    >   ASSIGN                                                   !1, 'really'
          6      > JMP                                                      ->28
    6     7    >   IS_SMALLER                                       ~6      !0, 3
          8        IS_EQUAL                                                 !0, ~6
          9      > JMPZ                                                     ~7, ->12
    7    10    >   ASSIGN                                                   !1, 'quite+bad'
         11      > JMP                                                      ->28
    8    12    >   IS_SMALLER                                       ~9      !0, 5
         13        IS_EQUAL                                                 !0, ~9
         14      > JMPZ                                                     ~10, ->17
    9    15    >   ASSIGN                                                   !1, 'pay+attention'
         16      > JMP                                                      ->28
   10    17    >   IS_SMALLER_OR_EQUAL                              ~12     !0, 9
         18        IS_EQUAL                                                 !0, ~12
         19      > JMPZ                                                     ~13, ->22
   11    20    >   ASSIGN                                                   !1, 'quite+good'
         21      > JMP                                                      ->28
   12    22    >   IS_SMALLER_OR_EQUAL                              ~15     !0, 10
         23        IS_EQUAL                                                 !0, ~15
         24      > JMPZ                                                     ~16, ->27
   13    25    >   ASSIGN                                                   !1, 'congrat'
         26      > JMP                                                      ->28
   15    27    >   ASSIGN                                                   !1, 'Oops'
   18    28    >   CONCAT                                           ~19     !0, '+'
         29        CONCAT                                           ~20     ~19, !1
         30        CONCAT                                           ~21     ~20, '%0A'
         31        ECHO                                                     ~21
    3    32        PRE_DEC                                                  !0
         33    >   IS_SMALLER_OR_EQUAL                                      0, !0
         34      > JMPNZ                                                    ~23, ->2
   20    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156 ms | 1399 KiB | 13 Q