3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month=12; $year=2014; $startdate = strtotime($year.'-'.$month.'-1'); $stopdate = strtotime('last day of this month ',$startdate); echo (date('Y-m-d',$startDate).' - '.date('Y-m-d',$stopDate));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/91npY
function name:  (null)
number of ops:  26
compiled vars:  !0 = $month, !1 = $year, !2 = $startdate, !3 = $stopdate, !4 = $startDate, !5 = $stopDate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 12
    3     1        ASSIGN                                                   !1, 2014
    5     2        INIT_FCALL                                               'strtotime'
          3        CONCAT                                           ~8      !1, '-'
          4        CONCAT                                           ~9      ~8, !0
          5        CONCAT                                           ~10     ~9, '-1'
          6        SEND_VAL                                                 ~10
          7        DO_ICALL                                         $11     
          8        ASSIGN                                                   !2, $11
    6     9        INIT_FCALL                                               'strtotime'
         10        SEND_VAL                                                 'last+day+of+this+month+'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $13     
         13        ASSIGN                                                   !3, $13
    8    14        INIT_FCALL                                               'date'
         15        SEND_VAL                                                 'Y-m-d'
         16        SEND_VAR                                                 !4
         17        DO_ICALL                                         $15     
         18        CONCAT                                           ~16     $15, '+-+'
         19        INIT_FCALL                                               'date'
         20        SEND_VAL                                                 'Y-m-d'
         21        SEND_VAR                                                 !5
         22        DO_ICALL                                         $17     
         23        CONCAT                                           ~18     ~16, $17
         24        ECHO                                                     ~18
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.46 ms | 1395 KiB | 17 Q