3v4l.org

run code in 500+ PHP versions simultaneously
<?php $months = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); $i = $current_month = 5; do { echo $months[$i] . "\n"; $i = ($i + 1) % 12; } while ($i != $current_month); $year = 2018; $i = $current_month = 5; do { echo $months[$i] . " $year\n"; $i = ($i + 1) % 12; if ($i == 0) $year++; } while ($i != $current_month);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 14
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
Branch analysis from position: 26
Branch analysis from position: 3
filename:       /in/sHl3O
function name:  (null)
number of ops:  29
compiled vars:  !0 = $months, !1 = $i, !2 = $current_month, !3 = $year
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        ASSIGN                                               ~5      !2, 5
          2        ASSIGN                                                       !1, ~5
    5     3    >   FETCH_DIM_R                                          ~7      !0, !1
          4        CONCAT                                               ~8      ~7, '%0A'
          5        ECHO                                                         ~8
    6     6        ADD                                                  ~9      !1, 1
          7        MOD                                                  ~10     ~9, 12
          8        ASSIGN                                                       !1, ~10
    7     9        IS_NOT_EQUAL                                                 !1, !2
         10      > JMPNZ                                                        ~12, ->3
    9    11    >   ASSIGN                                                       !3, 2018
   10    12        ASSIGN                                               ~14     !2, 5
         13        ASSIGN                                                       !1, ~14
   12    14    >   FETCH_DIM_R                                          ~16     !0, !1
         15        ROPE_INIT                                         3  ~18     '+'
         16        ROPE_ADD                                          1  ~18     ~18, !3
         17        ROPE_END                                          2  ~17     ~18, '%0A'
         18        CONCAT                                               ~20     ~16, ~17
         19        ECHO                                                         ~20
   13    20        ADD                                                  ~21     !1, 1
         21        MOD                                                  ~22     ~21, 12
         22        ASSIGN                                                       !1, ~22
   14    23        IS_EQUAL                                                     !1, 0
         24      > JMPZ                                                         ~24, ->26
         25    >   PRE_INC                                                      !3
   15    26    >   IS_NOT_EQUAL                                                 !1, !2
         27      > JMPNZ                                                        ~26, ->14
         28    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.17 ms | 2006 KiB | 13 Q