3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a=(new \DateTime())->format('Y-m-d'); echo (new DateTime($a))->modify('first day of this month');
based on 6GAv0
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      :-5
         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      :0
         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 7.3.0