3v4l.org

run code in 500+ PHP versions simultaneously
<?php $x = 1; $monday = date('Y-m-d', strtotime('monday this week +'.$x.' week')); $tuesday = date('Y-m-d', strtotime('tuesday this week +'.$x.' week')); $wednesday = date('Y-m-d', strtotime('wednesday this week +'.$x.' week')); $thursday = date('Y-m-d', strtotime('thursday this week +'.$x.' week')); $friday = date('Y-m-d', strtotime('friday this week +'.$x.' week')); $saturday = date('Y-m-d', strtotime('saturday this week +'.$x.' week')); $sunday = date('Y-m-d', strtotime('sunday this week +'.$x.' week')); var_dump($monday, $tuesday, $wednesday, $thursday, $friday, $saturday, $sunday);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bt0PT
function name:  (null)
number of ops:  81
compiled vars:  !0 = $x, !1 = $monday, !2 = $tuesday, !3 = $wednesday, !4 = $thursday, !5 = $friday, !6 = $saturday, !7 = $sunday
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 1
    3     1        INIT_FCALL                                                   'date'
          2        SEND_VAL                                                     'Y-m-d'
          3        INIT_FCALL                                                   'strtotime'
          4        CONCAT                                               ~9      'monday+this+week+%2B', !0
          5        CONCAT                                               ~10     ~9, '+week'
          6        SEND_VAL                                                     ~10
          7        DO_ICALL                                             $11     
          8        SEND_VAR                                                     $11
          9        DO_ICALL                                             $12     
         10        ASSIGN                                                       !1, $12
    4    11        INIT_FCALL                                                   'date'
         12        SEND_VAL                                                     'Y-m-d'
         13        INIT_FCALL                                                   'strtotime'
         14        CONCAT                                               ~14     'tuesday+this+week+%2B', !0
         15        CONCAT                                               ~15     ~14, '+week'
         16        SEND_VAL                                                     ~15
         17        DO_ICALL                                             $16     
         18        SEND_VAR                                                     $16
         19        DO_ICALL                                             $17     
         20        ASSIGN                                                       !2, $17
    5    21        INIT_FCALL                                                   'date'
         22        SEND_VAL                                                     'Y-m-d'
         23        INIT_FCALL                                                   'strtotime'
         24        CONCAT                                               ~19     'wednesday+this+week+%2B', !0
         25        CONCAT                                               ~20     ~19, '+week'
         26        SEND_VAL                                                     ~20
         27        DO_ICALL                                             $21     
         28        SEND_VAR                                                     $21
         29        DO_ICALL                                             $22     
         30        ASSIGN                                                       !3, $22
    6    31        INIT_FCALL                                                   'date'
         32        SEND_VAL                                                     'Y-m-d'
         33        INIT_FCALL                                                   'strtotime'
         34        CONCAT                                               ~24     'thursday+this+week+%2B', !0
         35        CONCAT                                               ~25     ~24, '+week'
         36        SEND_VAL                                                     ~25
         37        DO_ICALL                                             $26     
         38        SEND_VAR                                                     $26
         39        DO_ICALL                                             $27     
         40        ASSIGN                                                       !4, $27
    7    41        INIT_FCALL                                                   'date'
         42        SEND_VAL                                                     'Y-m-d'
         43        INIT_FCALL                                                   'strtotime'
         44        CONCAT                                               ~29     'friday+this+week+%2B', !0
         45        CONCAT                                               ~30     ~29, '+week'
         46        SEND_VAL                                                     ~30
         47        DO_ICALL                                             $31     
         48        SEND_VAR                                                     $31
         49        DO_ICALL                                             $32     
         50        ASSIGN                                                       !5, $32
    8    51        INIT_FCALL                                                   'date'
         52        SEND_VAL                                                     'Y-m-d'
         53        INIT_FCALL                                                   'strtotime'
         54        CONCAT                                               ~34     'saturday+this+week+%2B', !0
         55        CONCAT                                               ~35     ~34, '+week'
         56        SEND_VAL                                                     ~35
         57        DO_ICALL                                             $36     
         58        SEND_VAR                                                     $36
         59        DO_ICALL                                             $37     
         60        ASSIGN                                                       !6, $37
    9    61        INIT_FCALL                                                   'date'
         62        SEND_VAL                                                     'Y-m-d'
         63        INIT_FCALL                                                   'strtotime'
         64        CONCAT                                               ~39     'sunday+this+week+%2B', !0
         65        CONCAT                                               ~40     ~39, '+week'
         66        SEND_VAL                                                     ~40
         67        DO_ICALL                                             $41     
         68        SEND_VAR                                                     $41
         69        DO_ICALL                                             $42     
         70        ASSIGN                                                       !7, $42
   11    71        INIT_FCALL                                                   'var_dump'
         72        SEND_VAR                                                     !1
         73        SEND_VAR                                                     !2
         74        SEND_VAR                                                     !3
         75        SEND_VAR                                                     !4
         76        SEND_VAR                                                     !5
         77        SEND_VAR                                                     !6
         78        SEND_VAR                                                     !7
         79        DO_ICALL                                                     
         80      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.62 ms | 3265 KiB | 16 Q