3v4l.org

run code in 300+ PHP versions simultaneously
<?php $today = getdate(); $last2Months = getdate(strtotime("2 months ago", $today[0])); var_dump($last2Months); $nextMonth = getdate(strtotime("+1 month",$last2Months[0])); var_dump($nextMonth);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XgAei
function name:  (null)
number of ops:  28
compiled vars:  !0 = $today, !1 = $last2Months, !2 = $nextMonth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'getdate'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    3     3        INIT_FCALL                                               'getdate'
          4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2+months+ago'
          6        FETCH_DIM_R                                      ~5      !0, 0
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !1, $7
    4    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
    5    15        INIT_FCALL                                               'getdate'
         16        INIT_FCALL                                               'strtotime'
         17        SEND_VAL                                                 '%2B1+month'
         18        FETCH_DIM_R                                      ~10     !1, 0
         19        SEND_VAL                                                 ~10
         20        DO_ICALL                                         $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                         $12     
         23        ASSIGN                                                   !2, $12
    6    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.59 ms | 1395 KiB | 19 Q