3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Prague'); $t = time() - 24*60*60; $t1 = strtotime("next month", $t); $t2 = strtotime("first day of next month", $t); var_dump($t1, $t2, $t2-$t1); echo date("01.m.Y", $t1); echo "\n"; echo date("d.m.Y", $t2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mpg1C
function name:  (null)
number of ops:  35
compiled vars:  !0 = $t, !1 = $t1, !2 = $t2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Europe%2FPrague'
          2        DO_ICALL                                                 
    5     3        INIT_FCALL                                               'time'
          4        DO_ICALL                                         $4      
          5        SUB                                              ~5      $4, 86400
          6        ASSIGN                                                   !0, ~5
    6     7        INIT_FCALL                                               'strtotime'
          8        SEND_VAL                                                 'next+month'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !1, $7
    7    12        INIT_FCALL                                               'strtotime'
         13        SEND_VAL                                                 'first+day+of+next+month'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !2, $9
    9    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !2
         20        SUB                                              ~11     !2, !1
         21        SEND_VAL                                                 ~11
         22        DO_ICALL                                                 
   11    23        INIT_FCALL                                               'date'
         24        SEND_VAL                                                 '01.m.Y'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $13     
         27        ECHO                                                     $13
   12    28        ECHO                                                     '%0A'
   13    29        INIT_FCALL                                               'date'
         30        SEND_VAL                                                 'd.m.Y'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                         $14     
         33        ECHO                                                     $14
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.35 ms | 1396 KiB | 23 Q