3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.58 ms | 945 KiB | 18 Q