3v4l.org

run code in 300+ PHP versions simultaneously
<?php $m = 1; $y = 2016; foreach (range(1, 31) as $day) { if($day <= 9){ $day = '0'.$day; } echo str_pad(date('l',strtotime("$m/$day/$y")), 9, " ", STR_PAD_LEFT)," $m/$day/$y: ", date('r',strtotime("monday this week",strtotime("$m/$day/$y"))),"\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 58
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 58
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
filename:       /in/34YOl
function name:  (null)
number of ops:  60
compiled vars:  !0 = $m, !1 = $y, !2 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        ASSIGN                                                   !1, 2016
    6     2        INIT_FCALL                                               'range'
          3        SEND_VAL                                                 1
          4        SEND_VAL                                                 31
          5        DO_ICALL                                         $5      
          6      > FE_RESET_R                                       $6      $5, ->58
          7    > > FE_FETCH_R                                               $6, !2, ->58
    7     8    >   IS_SMALLER_OR_EQUAL                                      !2, 9
          9      > JMPZ                                                     ~7, ->12
    8    10    >   CONCAT                                           ~8      '0', !2
         11        ASSIGN                                                   !2, ~8
   10    12    >   INIT_FCALL                                               'str_pad'
         13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'l'
         15        INIT_FCALL                                               'strtotime'
         16        ROPE_INIT                                     5  ~11     !0
         17        ROPE_ADD                                      1  ~11     ~11, '%2F'
         18        ROPE_ADD                                      2  ~11     ~11, !2
         19        ROPE_ADD                                      3  ~11     ~11, '%2F'
         20        ROPE_END                                      4  ~10     ~11, !1
         21        SEND_VAL                                                 ~10
         22        DO_ICALL                                         $14     
         23        SEND_VAR                                                 $14
         24        DO_ICALL                                         $15     
         25        SEND_VAR                                                 $15
         26        SEND_VAL                                                 9
         27        SEND_VAL                                                 '+'
         28        SEND_VAL                                                 0
         29        DO_ICALL                                         $16     
         30        ECHO                                                     $16
         31        ROPE_INIT                                     7  ~18     '+'
         32        ROPE_ADD                                      1  ~18     ~18, !0
         33        ROPE_ADD                                      2  ~18     ~18, '%2F'
         34        ROPE_ADD                                      3  ~18     ~18, !2
         35        ROPE_ADD                                      4  ~18     ~18, '%2F'
         36        ROPE_ADD                                      5  ~18     ~18, !1
         37        ROPE_END                                      6  ~17     ~18, '%3A+'
         38        ECHO                                                     ~17
   11    39        INIT_FCALL                                               'date'
         40        SEND_VAL                                                 'r'
         41        INIT_FCALL                                               'strtotime'
         42        SEND_VAL                                                 'monday+this+week'
         43        INIT_FCALL                                               'strtotime'
         44        ROPE_INIT                                     5  ~23     !0
         45        ROPE_ADD                                      1  ~23     ~23, '%2F'
         46        ROPE_ADD                                      2  ~23     ~23, !2
         47        ROPE_ADD                                      3  ~23     ~23, '%2F'
         48        ROPE_END                                      4  ~22     ~23, !1
         49        SEND_VAL                                                 ~22
         50        DO_ICALL                                         $26     
         51        SEND_VAR                                                 $26
         52        DO_ICALL                                         $27     
         53        SEND_VAR                                                 $27
         54        DO_ICALL                                         $28     
         55        ECHO                                                     $28
         56        ECHO                                                     '%0A'
    6    57      > JMP                                                      ->7
         58    >   FE_FREE                                                  $6
   12    59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.15 ms | 1400 KiB | 21 Q