3v4l.org

run code in 300+ PHP versions simultaneously
<?php $needYear=2018; $needMonth=10; // $_startTime = strtotime('2018-10-31 00:00:00'); // $_endTime = strtotime('2018-11-01 00:00:00'); // var_dump(date('Y-n', $_startTime), date('Y-n', $_endTime), $needYear . '-' . $needMonth); var_dump(date('Y-m-d', strtotime('last day of 2018-10'))); var_dump(date('Y-m-d', strtotime('2018-10 last day'))); var_dump(date('Y-m-d', strtotime('first day of 2018-10'))); var_dump(date('Y-m-d', strtotime('2018-10 first day')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NjSAe
function name:  (null)
number of ops:  43
compiled vars:  !0 = $needYear, !1 = $needMonth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2018
    4     1        ASSIGN                                                   !1, 10
   11     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'Y-m-d'
          5        INIT_FCALL                                               'strtotime'
          6        SEND_VAL                                                 'last+day+of+2018-10'
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
   12    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'Y-m-d'
         15        INIT_FCALL                                               'strtotime'
         16        SEND_VAL                                                 '2018-10+last+day'
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                         $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                                 
   13    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'date'
         24        SEND_VAL                                                 'Y-m-d'
         25        INIT_FCALL                                               'strtotime'
         26        SEND_VAL                                                 'first+day+of+2018-10'
         27        DO_ICALL                                         $10     
         28        SEND_VAR                                                 $10
         29        DO_ICALL                                         $11     
         30        SEND_VAR                                                 $11
         31        DO_ICALL                                                 
   14    32        INIT_FCALL                                               'var_dump'
         33        INIT_FCALL                                               'date'
         34        SEND_VAL                                                 'Y-m-d'
         35        INIT_FCALL                                               'strtotime'
         36        SEND_VAL                                                 '2018-10+first+day'
         37        DO_ICALL                                         $13     
         38        SEND_VAR                                                 $13
         39        DO_ICALL                                         $14     
         40        SEND_VAR                                                 $14
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.02 ms | 1396 KiB | 19 Q