3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.1 ms | 1399 KiB | 16 Q