3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new DateTime(); $d = $d->format("w"); echo $d . " -> " . ($d + 6) % 7 . "\n"; for($i=0; $i <= 7; $i++) echo $i . " -> " . ($i+6)%7 . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 15
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 15
Branch analysis from position: 24
Branch analysis from position: 15
filename:       /in/YWWP2
function name:  (null)
number of ops:  25
compiled vars:  !0 = $d, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'format'
          4        SEND_VAL_EX                                              'w'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !0, $5
    5     7        CONCAT                                           ~7      !0, '+-%3E+'
          8        ADD                                              ~8      !0, 6
          9        MOD                                              ~9      ~8, 7
         10        CONCAT                                           ~10     ~7, ~9
         11        CONCAT                                           ~11     ~10, '%0A'
         12        ECHO                                                     ~11
    6    13        ASSIGN                                                   !1, 0
         14      > JMP                                                      ->22
    7    15    >   CONCAT                                           ~13     !1, '+-%3E+'
         16        ADD                                              ~14     !1, 6
         17        MOD                                              ~15     ~14, 7
         18        CONCAT                                           ~16     ~13, ~15
         19        CONCAT                                           ~17     ~16, '%0A'
         20        ECHO                                                     ~17
    6    21        PRE_INC                                                  !1
         22    >   IS_SMALLER_OR_EQUAL                                      !1, 7
         23      > JMPNZ                                                    ~19, ->15
    7    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.7 ms | 1394 KiB | 13 Q