3v4l.org

run code in 300+ PHP versions simultaneously
<?php const WEEKDAYS = ['M', 'T', 'W', 'Th', 'F', 'S', 'Su']; foreach (WEEKDAYS as $weekdayKey => $weekday) { echo '<div class="form-check form-check-inline">' . PHP_EOL . ' <input class="form-check-input" type="checkbox" id="classDays[]" name="classDays[]" value="' . $weekday . '">' . PHP_EOL . ' <label class="form-check-label" for="classDays[]">' . PHP_EOL . ' ' . date('l', strtotime('2022-01-0' . ($weekdayKey + 3))) . PHP_EOL . ' </label>' . PHP_EOL . '</div>' . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 28
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 28
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/GXR2X
function name:  (null)
number of ops:  30
compiled vars:  !0 = $weekday, !1 = $weekdayKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'WEEKDAYS', <array>
    5     1        FETCH_CONSTANT                                   ~2      'WEEKDAYS'
          2      > FE_RESET_R                                       $3      ~2, ->28
          3    > > FE_FETCH_R                                       ~4      $3, !0, ->28
          4    >   ASSIGN                                                   !1, ~4
    7     5        CONCAT                                           ~6      '%3Cdiv+class%3D%22form-check+form-check-inline%22%3E%0A++%3Cinput+class%3D%22form-check-input%22+type%3D%22checkbox%22+id%3D%22classDays%5B%5D%22+name%3D%22classDays%5B%5D%22+value%3D%22', !0
          6        CONCAT                                           ~7      ~6, '%22%3E'
          7        CONCAT                                           ~8      ~7, '%0A'
    8     8        CONCAT                                           ~9      ~8, '++%3Clabel+class%3D%22form-check-label%22+for%3D%22classDays%5B%5D%22%3E'
          9        CONCAT                                           ~10     ~9, '%0A'
    9    10        CONCAT                                           ~11     ~10, '++++'
         11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'l'
         13        INIT_FCALL                                               'strtotime'
         14        ADD                                              ~12     !1, 3
         15        CONCAT                                           ~13     '2022-01-0', ~12
         16        SEND_VAL                                                 ~13
         17        DO_ICALL                                         $14     
         18        SEND_VAR                                                 $14
         19        DO_ICALL                                         $15     
         20        CONCAT                                           ~16     ~11, $15
         21        CONCAT                                           ~17     ~16, '%0A'
   10    22        CONCAT                                           ~18     ~17, '++%3C%2Flabel%3E'
         23        CONCAT                                           ~19     ~18, '%0A'
   11    24        CONCAT                                           ~20     ~19, '%3C%2Fdiv%3E'
         25        CONCAT                                           ~21     ~20, '%0A'
         26        ECHO                                                     ~21
    5    27      > JMP                                                      ->3
         28    >   FE_FREE                                                  $3
   12    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.9 ms | 1002 KiB | 15 Q