3v4l.org

run code in 300+ PHP versions simultaneously
<?php $day1 = new DateTime( '2010-01-30' ); $day1->modify( '+1 month' ); $firstdaynextmonth=$day1->format( 'm' ); $firstday=$day1->format( 'd-m-Y' ); $day2 = new DateTime( '2010-01-30' ); $day2->modify( 'last day of next month' ); $seconddaynextmonth=$day2->format( 'm' ); $secondday=$day2->format( 'd-m-Y' ); echo "1st-".$firstday, "\n"; echo "2nd-".$secondday, "\n"; echo "1stnext month-".$firstdaynextmonth, "\n"; echo "2ndnext month-".$seconddaynextmonth, "\n"; if($firstday > $secondday){ echo $secondday; } else echo $firstday; //$result=($firstday > $secondday)?$firstday:$secondday; //echo $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aaKGu
function name:  (null)
number of ops:  48
compiled vars:  !0 = $day1, !1 = $firstdaynextmonth, !2 = $firstday, !3 = $day2, !4 = $seconddaynextmonth, !5 = $secondday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $6      'DateTime'
          1        SEND_VAL_EX                                              '2010-01-30'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $6
    3     4        INIT_METHOD_CALL                                         !0, 'modify'
          5        SEND_VAL_EX                                              '%2B1+month'
          6        DO_FCALL                                      0          
    4     7        INIT_METHOD_CALL                                         !0, 'format'
          8        SEND_VAL_EX                                              'm'
          9        DO_FCALL                                      0  $10     
         10        ASSIGN                                                   !1, $10
    5    11        INIT_METHOD_CALL                                         !0, 'format'
         12        SEND_VAL_EX                                              'd-m-Y'
         13        DO_FCALL                                      0  $12     
         14        ASSIGN                                                   !2, $12
    7    15        NEW                                              $14     'DateTime'
         16        SEND_VAL_EX                                              '2010-01-30'
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !3, $14
    8    19        INIT_METHOD_CALL                                         !3, 'modify'
         20        SEND_VAL_EX                                              'last+day+of+next+month'
         21        DO_FCALL                                      0          
    9    22        INIT_METHOD_CALL                                         !3, 'format'
         23        SEND_VAL_EX                                              'm'
         24        DO_FCALL                                      0  $18     
         25        ASSIGN                                                   !4, $18
   10    26        INIT_METHOD_CALL                                         !3, 'format'
         27        SEND_VAL_EX                                              'd-m-Y'
         28        DO_FCALL                                      0  $20     
         29        ASSIGN                                                   !5, $20
   12    30        CONCAT                                           ~22     '1st-', !2
         31        ECHO                                                     ~22
         32        ECHO                                                     '%0A'
   13    33        CONCAT                                           ~23     '2nd-', !5
         34        ECHO                                                     ~23
         35        ECHO                                                     '%0A'
   14    36        CONCAT                                           ~24     '1stnext+month-', !1
         37        ECHO                                                     ~24
         38        ECHO                                                     '%0A'
   15    39        CONCAT                                           ~25     '2ndnext+month-', !4
         40        ECHO                                                     ~25
         41        ECHO                                                     '%0A'
   16    42        IS_SMALLER                                               !5, !2
         43      > JMPZ                                                     ~26, ->46
   17    44    >   ECHO                                                     !5
         45      > JMP                                                      ->47
   20    46    >   ECHO                                                     !2
   22    47    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.88 ms | 1399 KiB | 13 Q