3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.87 ms | 1395 KiB | 21 Q