3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lastWeek = date('Y-m-d', strtotime('-1 week')); echo date('Y-m-d', strtotime('last monday', $lastWeek)); echo "\n"; echo date('Y-m-d', strtotime('next saturday', $lastWeek));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0GnCt
function name:  (null)
number of ops:  28
compiled vars:  !0 = $lastWeek
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y-m-d'
          2        INIT_FCALL                                               'strtotime'
          3        SEND_VAL                                                 '-1+week'
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7        ASSIGN                                                   !0, $2
    4     8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'Y-m-d'
         10        INIT_FCALL                                               'strtotime'
         11        SEND_VAL                                                 'last+monday'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        DO_ICALL                                         $5      
         16        ECHO                                                     $5
    5    17        ECHO                                                     '%0A'
    6    18        INIT_FCALL                                               'date'
         19        SEND_VAL                                                 'Y-m-d'
         20        INIT_FCALL                                               'strtotime'
         21        SEND_VAL                                                 'next+saturday'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $6      
         24        SEND_VAR                                                 $6
         25        DO_ICALL                                         $7      
         26        ECHO                                                     $7
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.61 ms | 1395 KiB | 17 Q