3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set("UTC"); $dt1 = new DateTime("2012-06-25"); $dt2 = new DateTime("2012-07-27"); $dt3 = new DateTime("2012-07-02"); $iv = $dt1->diff($dt2); var_dump($iv); $dt4 = $dt3->add($iv); echo $dt4->format("c");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7d0dn
function name:  (null)
number of ops:  31
compiled vars:  !0 = $dt1, !1 = $dt2, !2 = $dt3, !3 = $iv, !4 = $dt4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'UTC'
          2        DO_ICALL                                                 
    5     3        NEW                                              $6      'DateTime'
          4        SEND_VAL_EX                                              '2012-06-25'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $6
    6     7        NEW                                              $9      'DateTime'
          8        SEND_VAL_EX                                              '2012-07-27'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $9
    7    11        NEW                                              $12     'DateTime'
         12        SEND_VAL_EX                                              '2012-07-02'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $12
    9    15        INIT_METHOD_CALL                                         !0, 'diff'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $15     
         18        ASSIGN                                                   !3, $15
   10    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
   12    22        INIT_METHOD_CALL                                         !2, 'add'
         23        SEND_VAR_EX                                              !3
         24        DO_FCALL                                      0  $18     
         25        ASSIGN                                                   !4, $18
   13    26        INIT_METHOD_CALL                                         !4, 'format'
         27        SEND_VAL_EX                                              'c'
         28        DO_FCALL                                      0  $20     
         29        ECHO                                                     $20
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
13.33 ms | 462 KiB | 7 Q