3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(new \DateTimeImmutable('midnight 1 weeks ago')); $a = new DateTime(); var_dump($a->sub(new \DateInveral('P1W')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0WMG
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        NEW                                              $1      'DateTimeImmutable'
          2        SEND_VAL_EX                                              'midnight+1+weeks+ago'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                                 
    4     6        NEW                                              $4      'DateTime'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $4
    6     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'sub'
         11        NEW                                              $7      'DateInveral'
         12        SEND_VAL_EX                                              'P1W'
         13        DO_FCALL                                      0          
         14        SEND_VAR_NO_REF_EX                                       $7
         15        DO_FCALL                                      0  $9      
         16        SEND_VAR                                                 $9
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
227.96 ms | 1398 KiB | 15 Q