3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month = 4; $monthName = date('M', strtotime('2012-'.$month.'-01')); $from = strtotime('first day of '.$monthName); if ( $from < time() ) { $from = strtotime('first day of '.$monthName.' '.(date('Y')+1)); } $to = strtotime('last day of this month, 23:59:59', $from); echo date('d.m.Y H:i:s', $from)."\r\n"; echo date('d.m.Y H:i:s', $to)."\r\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 31
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/iWc6R
function name:  (null)
number of ops:  49
compiled vars:  !0 = $month, !1 = $monthName, !2 = $from, !3 = $to
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 4
    4     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'M'
          3        INIT_FCALL                                               'strtotime'
          4        CONCAT                                           ~5      '2012-', !0
          5        CONCAT                                           ~6      ~5, '-01'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                         $7      
          8        SEND_VAR                                                 $7
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !1, $8
    6    11        INIT_FCALL                                               'strtotime'
         12        CONCAT                                           ~10     'first+day+of+', !1
         13        SEND_VAL                                                 ~10
         14        DO_ICALL                                         $11     
         15        ASSIGN                                                   !2, $11
    7    16        INIT_FCALL                                               'time'
         17        DO_ICALL                                         $13     
         18        IS_SMALLER                                               !2, $13
         19      > JMPZ                                                     ~14, ->31
    8    20    >   INIT_FCALL                                               'strtotime'
         21        CONCAT                                           ~15     'first+day+of+', !1
         22        CONCAT                                           ~16     ~15, '+'
         23        INIT_FCALL                                               'date'
         24        SEND_VAL                                                 'Y'
         25        DO_ICALL                                         $17     
         26        ADD                                              ~18     $17, 1
         27        CONCAT                                           ~19     ~16, ~18
         28        SEND_VAL                                                 ~19
         29        DO_ICALL                                         $20     
         30        ASSIGN                                                   !2, $20
   11    31    >   INIT_FCALL                                               'strtotime'
         32        SEND_VAL                                                 'last+day+of+this+month%2C+23%3A59%3A59'
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                         $22     
         35        ASSIGN                                                   !3, $22
   13    36        INIT_FCALL                                               'date'
         37        SEND_VAL                                                 'd.m.Y+H%3Ai%3As'
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                         $24     
         40        CONCAT                                           ~25     $24, '%0D%0A'
         41        ECHO                                                     ~25
   14    42        INIT_FCALL                                               'date'
         43        SEND_VAL                                                 'd.m.Y+H%3Ai%3As'
         44        SEND_VAR                                                 !3
         45        DO_ICALL                                         $26     
         46        CONCAT                                           ~27     $26, '%0D%0A'
         47        ECHO                                                     ~27
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.79 ms | 1400 KiB | 19 Q