3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = date("Y"); $yearDoubleBack = date("Y", strtotime($year . " - 2 year")); $YearDoubleAhead = date("Y", strtotime($year . " + 2 year")); echo '$yearDoubleBack => ' . $yearDoubleBack; echo PHP_EOL; echo '$YearDoubleAhead => ' . $YearDoubleAhead; echo PHP_EOL; $years = range($yearDoubleBack, $YearDoubleAhead); print_r($years);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DLmql
function name:  (null)
number of ops:  37
compiled vars:  !0 = $year, !1 = $yearDoubleBack, !2 = $YearDoubleAhead, !3 = $years
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    4     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'Y'
          6        INIT_FCALL                                               'strtotime'
          7        CONCAT                                           ~6      !0, '+-+2+year'
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !1, $8
    5    13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'Y'
         15        INIT_FCALL                                               'strtotime'
         16        CONCAT                                           ~10     !0, '+%2B+2+year'
         17        SEND_VAL                                                 ~10
         18        DO_ICALL                                         $11     
         19        SEND_VAR                                                 $11
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !2, $12
    7    22        CONCAT                                           ~14     '%24yearDoubleBack+%3D%3E+', !1
         23        ECHO                                                     ~14
    8    24        ECHO                                                     '%0A'
    9    25        CONCAT                                           ~15     '%24YearDoubleAhead+%3D%3E+', !2
         26        ECHO                                                     ~15
   10    27        ECHO                                                     '%0A'
   12    28        INIT_FCALL                                               'range'
         29        SEND_VAR                                                 !1
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                         $16     
         32        ASSIGN                                                   !3, $16
   13    33        INIT_FCALL                                               'print_r'
         34        SEND_VAR                                                 !3
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
242.26 ms | 1004 KiB | 17 Q