3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.78 ms | 1395 KiB | 17 Q