3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.45 ms | 1392 KiB | 13 Q