3v4l.org

run code in 500+ PHP versions simultaneously
<?php $date_teste = date('Y-m-d', strtotime('last day of last month')); var_dump($date_teste); $date_teste = new DateTime('last day of last month'); var_dump($date_teste);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SUHoX
function name:  (null)
number of ops:  19
compiled vars:  !0 = $date_teste
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'date'
          1        SEND_VAL                                                     'Y-m-d'
          2        INIT_FCALL                                                   'strtotime'
          3        SEND_VAL                                                     'last+day+of+last+month'
          4        DO_ICALL                                             $1      
          5        SEND_VAR                                                     $1
          6        DO_ICALL                                             $2      
          7        ASSIGN                                                       !0, $2
    4     8        INIT_FCALL                                                   'var_dump'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                                     
    6    11        NEW                                                  $5      'DateTime'
         12        SEND_VAL_EX                                                  'last+day+of+last+month'
         13        DO_FCALL                                          0          
         14        ASSIGN                                                       !0, $5
    7    15        INIT_FCALL                                                   'var_dump'
         16        SEND_VAR                                                     !0
         17        DO_ICALL                                                     
         18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.33 ms | 2665 KiB | 16 Q