3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new DateTime( '2010-01-31' ); $d->modify( 'first day of next month' ); $day=strtotime( 'last day of +1 month', time()); echo $day->toString('yyyy-MM-dd');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/afmtj
function name:  (null)
number of ops:  19
compiled vars:  !0 = $d, !1 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              '2010-01-31'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    3     4        INIT_METHOD_CALL                                         !0, 'modify'
          5        SEND_VAL_EX                                              'first+day+of+next+month'
          6        DO_FCALL                                      0          
    4     7        INIT_FCALL                                               'strtotime'
          8        SEND_VAL                                                 'last+day+of+%2B1+month'
          9        INIT_FCALL                                               'time'
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !1, $7
    5    14        INIT_METHOD_CALL                                         !1, 'toString'
         15        SEND_VAL_EX                                              'yyyy-MM-dd'
         16        DO_FCALL                                      0  $9      
         17        ECHO                                                     $9
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.12 ms | 1394 KiB | 17 Q