3v4l.org

run code in 300+ PHP versions simultaneously
<?php $weekdate = 2; // sets workdate to 2 $weekdate = $weekdate - 1; //take 1 from that start number, workdate is 1 week $newdate = date('d m y', strtotime("+" . $weekdate . " Week")); //add 1 to number of weeks from today echo $newdate; //echo out.
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DR2HH
function name:  (null)
number of ops:  15
compiled vars:  !0 = $weekdate, !1 = $newdate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2
    5     1        SUB                                              ~3      !0, 1
          2        ASSIGN                                                   !0, ~3
    7     3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'd+m+y'
          5        INIT_FCALL                                               'strtotime'
          6        CONCAT                                           ~5      '%2B', !0
          7        CONCAT                                           ~6      ~5, '+Week'
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !1, $8
    9    13        ECHO                                                     !1
   10    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.87 ms | 997 KiB | 15 Q