3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = strtotime(date('Y-m').'-01'); echo date('Y-m-d',$time); echo '<br>'.$final = date("Y-m-d", strtotime("-1 month", $time)); echo date('m-01-Y 00:00:00',strtotime('this month')) . '<br/>'; echo date('m-t-Y 12:59:59',strtotime('this month')) . '<br/>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bpcSn
function name:  (null)
number of ops:  43
compiled vars:  !0 = $time, !1 = $final
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'strtotime'
          1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m'
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      $2, '-01'
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
    3     8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'Y-m-d'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        ECHO                                                     $6
    4    13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'Y-m-d'
         15        INIT_FCALL                                               'strtotime'
         16        SEND_VAL                                                 '-1+month'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $7      
         19        SEND_VAR                                                 $7
         20        DO_ICALL                                         $8      
         21        ASSIGN                                           ~9      !1, $8
         22        CONCAT                                           ~10     '%3Cbr%3E', ~9
         23        ECHO                                                     ~10
    6    24        INIT_FCALL                                               'date'
         25        SEND_VAL                                                 'm-01-Y+00%3A00%3A00'
         26        INIT_FCALL                                               'strtotime'
         27        SEND_VAL                                                 'this+month'
         28        DO_ICALL                                         $11     
         29        SEND_VAR                                                 $11
         30        DO_ICALL                                         $12     
         31        CONCAT                                           ~13     $12, '%3Cbr%2F%3E'
         32        ECHO                                                     ~13
    7    33        INIT_FCALL                                               'date'
         34        SEND_VAL                                                 'm-t-Y+12%3A59%3A59'
         35        INIT_FCALL                                               'strtotime'
         36        SEND_VAL                                                 'this+month'
         37        DO_ICALL                                         $14     
         38        SEND_VAR                                                 $14
         39        DO_ICALL                                         $15     
         40        CONCAT                                           ~16     $15, '%3Cbr%2F%3E'
         41        ECHO                                                     ~16
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.45 ms | 1396 KiB | 17 Q