3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new DateTime(); $test = clone $dt; $test->modify('first day'); var_dump($test->format('r')); $test = clone $dt; $test->modify('first day of'); var_dump($test->format('r'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bm0q0
function name:  (null)
number of ops:  26
compiled vars:  !0 = $dt, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        CLONE                                            ~5      !0
          4        ASSIGN                                                   !1, ~5
    6     5        INIT_METHOD_CALL                                         !1, 'modify'
          6        SEND_VAL_EX                                              'first+day'
          7        DO_FCALL                                      0          
    7     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !1, 'format'
         10        SEND_VAL_EX                                              'r'
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
    9    14        CLONE                                            ~10     !0
         15        ASSIGN                                                   !1, ~10
   10    16        INIT_METHOD_CALL                                         !1, 'modify'
         17        SEND_VAL_EX                                              'first+day+of'
         18        DO_FCALL                                      0          
   11    19        INIT_FCALL                                               'var_dump'
         20        INIT_METHOD_CALL                                         !1, 'format'
         21        SEND_VAL_EX                                              'r'
         22        DO_FCALL                                      0  $13     
         23        SEND_VAR                                                 $13
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.8 ms | 1395 KiB | 15 Q