3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start= "2013-01-31"; $current = date('F', strtotime("first day of next month",strtotime($start))); echo $current."\n"; $date = new DateTime('2013-01-31'); $date->modify( 'first day of next month' ); echo $date->format('F');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jY1OC
function name:  (null)
number of ops:  27
compiled vars:  !0 = $start, !1 = $current, !2 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2013-01-31'
    4     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'F'
          3        INIT_FCALL                                               'strtotime'
          4        SEND_VAL                                                 'first+day+of+next+month'
          5        INIT_FCALL                                               'strtotime'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !1, $6
    5    13        CONCAT                                           ~8      !1, '%0A'
         14        ECHO                                                     ~8
    8    15        NEW                                              $9      'DateTime'
         16        SEND_VAL_EX                                              '2013-01-31'
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !2, $9
    9    19        INIT_METHOD_CALL                                         !2, 'modify'
         20        SEND_VAL_EX                                              'first+day+of+next+month'
         21        DO_FCALL                                      0          
   10    22        INIT_METHOD_CALL                                         !2, 'format'
         23        SEND_VAL_EX                                              'F'
         24        DO_FCALL                                      0  $13     
         25        ECHO                                                     $13
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.04 ms | 1387 KiB | 17 Q