3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dt = new DateTime('2022-01-31 14:00:00'); if($dt->format('d') == $dt->format('t')){ $dt->modify('last Day of next month'); } //test output echo $dt->format('Y-m-d H:i:s')."\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/6lShH
function name:  (null)
number of ops:  21
compiled vars:  !0 = $dt
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $1      'DateTime'
          1        SEND_VAL_EX                                                  '2022-01-31+14%3A00%3A00'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
    5     4        INIT_METHOD_CALL                                             !0, 'format'
          5        SEND_VAL_EX                                                  'd'
          6        DO_FCALL                                          0  $4      
          7        INIT_METHOD_CALL                                             !0, 'format'
          8        SEND_VAL_EX                                                  't'
          9        DO_FCALL                                          0  $5      
         10        IS_EQUAL                                                     $4, $5
         11      > JMPZ                                                         ~6, ->15
    6    12    >   INIT_METHOD_CALL                                             !0, 'modify'
         13        SEND_VAL_EX                                                  'last+Day+of+next+month'
         14        DO_FCALL                                          0          
   10    15    >   INIT_METHOD_CALL                                             !0, 'format'
         16        SEND_VAL_EX                                                  'Y-m-d+H%3Ai%3As'
         17        DO_FCALL                                          0  $8      
         18        CONCAT                                               ~9      $8, '%0A'
         19        ECHO                                                         ~9
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
125.17 ms | 474 KiB | 7 Q