3v4l.org

run code in 500+ PHP versions simultaneously
<?php $sunday = new DateTimeImmutable('Sunday'); for ($dow = 0; $dow <= 6; $dow++) { $weekday = $sunday->add(new DateInterval('P'. $dow .'D')); printf('%s = %s (%s)' . PHP_EOL, $dow, $weekday->format('l'), $weekday->format('D')); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 6
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 6
Branch analysis from position: 30
Branch analysis from position: 6
filename:       /in/5P8kU
function name:  (null)
number of ops:  31
compiled vars:  !0 = $sunday, !1 = $dow, !2 = $weekday
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $3      'DateTimeImmutable'
          1        SEND_VAL_EX                                                  'Sunday'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
    4     4        ASSIGN                                                       !1, 0
          5      > JMP                                                          ->28
    5     6    >   INIT_METHOD_CALL                                             !0, 'add'
          7        NEW                                                  $7      'DateInterval'
          8        CONCAT                                               ~8      'P', !1
          9        CONCAT                                               ~9      ~8, 'D'
         10        SEND_VAL_EX                                                  ~9
         11        DO_FCALL                                          0          
         12        SEND_VAR_NO_REF_EX                                           $7
         13        DO_FCALL                                          0  $11     
         14        ASSIGN                                                       !2, $11
    7    15        INIT_FCALL                                                   'printf'
         16        SEND_VAL                                                     '%25s+%3D+%25s+%28%25s%29%0A'
         17        SEND_VAR                                                     !1
         18        INIT_METHOD_CALL                                             !2, 'format'
         19        SEND_VAL_EX                                                  'l'
         20        DO_FCALL                                          0  $13     
         21        SEND_VAR                                                     $13
         22        INIT_METHOD_CALL                                             !2, 'format'
         23        SEND_VAL_EX                                                  'D'
         24        DO_FCALL                                          0  $14     
         25        SEND_VAR                                                     $14
         26        DO_ICALL                                                     
    4    27        PRE_INC                                                      !1
         28    >   IS_SMALLER_OR_EQUAL                                          !1, 6
         29      > JMPNZ                                                        ~17, ->6
    8    30    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.81 ms | 2019 KiB | 14 Q