3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=(new \DateTime())->format('Y-m-d'); echo (new DateTime($a))->modify('first day of this month');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dcs8I
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'DateTime'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'format'
          3        SEND_VAL_EX                                              'Y-m-d'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !0, $3
    3     6        NEW                                              $5      'DateTime'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        INIT_METHOD_CALL                                         $5, 'modify'
         10        SEND_VAL_EX                                              'first+day+of+this+month'
         11        DO_FCALL                                      0  $7      
         12        ECHO                                                     $7
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.69 ms | 1393 KiB | 13 Q