3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 1; $i <= 31; $i++) { if ($i < 10){ $day = '0'.$i; if( ($i+1) < 10 ) $next_day = '0'.($i+1); else $next_day=$i; } else{ $day = $i; $next_day = ($i+1); } echo "$day $next_day".PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
Branch analysis from position: 2
filename:       /in/nDscY
function name:  (null)
number of ops:  27
compiled vars:  !0 = $i, !1 = $day, !2 = $next_day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->24
    4     2    >   IS_SMALLER                                               !0, 10
          3      > JMPZ                                                     ~4, ->15
    5     4    >   CONCAT                                           ~5      '0', !0
          5        ASSIGN                                                   !1, ~5
    6     6        ADD                                              ~7      !0, 1
          7        IS_SMALLER                                               ~7, 10
          8      > JMPZ                                                     ~8, ->13
    7     9    >   ADD                                              ~9      !0, 1
         10        CONCAT                                           ~10     '0', ~9
         11        ASSIGN                                                   !2, ~10
         12      > JMP                                                      ->14
    9    13    >   ASSIGN                                                   !2, !0
         14    > > JMP                                                      ->18
   12    15    >   ASSIGN                                                   !1, !0
   13    16        ADD                                              ~14     !0, 1
         17        ASSIGN                                                   !2, ~14
   15    18    >   ROPE_INIT                                     3  ~17     !1
         19        ROPE_ADD                                      1  ~17     ~17, '+'
         20        ROPE_END                                      2  ~16     ~17, !2
         21        CONCAT                                           ~19     ~16, '%0A'
         22        ECHO                                                     ~19
    2    23        PRE_INC                                                  !0
         24    >   IS_SMALLER_OR_EQUAL                                      !0, 31
         25      > JMPNZ                                                    ~21, ->2
   16    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.17 ms | 1395 KiB | 13 Q