3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Your starting date as DateTime $currentDate = new DateTime(date('Y-m-d')); //Add 1 month $currentDate->add(new DateInterval('P1M')); //Get the first day of the next month as string $firstDayOfNextMonth = strtotime($currentDate->format('Y-m-1')); echo date('m/d/Y', $firstDayOfNextMonth);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AVoKr
function name:  (null)
number of ops:  26
compiled vars:  !0 = $currentDate, !1 = $firstDayOfNextMonth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTime'
          1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m-d'
          3        DO_ICALL                                         $3      
          4        SEND_VAR_NO_REF_EX                                       $3
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
    6     7        INIT_METHOD_CALL                                         !0, 'add'
          8        NEW                                              $6      'DateInterval'
          9        SEND_VAL_EX                                              'P1M'
         10        DO_FCALL                                      0          
         11        SEND_VAR_NO_REF_EX                                       $6
         12        DO_FCALL                                      0          
    9    13        INIT_FCALL                                               'strtotime'
         14        INIT_METHOD_CALL                                         !0, 'format'
         15        SEND_VAL_EX                                              'Y-m-1'
         16        DO_FCALL                                      0  $9      
         17        SEND_VAR                                                 $9
         18        DO_ICALL                                         $10     
         19        ASSIGN                                                   !1, $10
   11    20        INIT_FCALL                                               'date'
         21        SEND_VAL                                                 'm%2Fd%2FY'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $12     
         24        ECHO                                                     $12
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.37 ms | 1386 KiB | 17 Q