3v4l.org

run code in 500+ PHP versions simultaneously
<?php $start = new \DateTime('2015-08-31 00:00:00.000001'); $end = new \DateTime('2015-09-01 00:00:00.000000'); $diff = $start->diff($end); var_dump($diff); assert($diff->days === 0); assert($diff->d === 0); assert($diff->f === 1.0E-6);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6INks
function name:  (null)
number of ops:  37
compiled vars:  !0 = $start, !1 = $end, !2 = $diff
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $3      'DateTime'
          1        SEND_VAL_EX                                                  '2015-08-31+00%3A00%3A00.000001'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
    4     4        NEW                                                  $6      'DateTime'
          5        SEND_VAL_EX                                                  '2015-09-01+00%3A00%3A00.000000'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $6
    6     8        INIT_METHOD_CALL                                             !0, 'diff'
          9        SEND_VAR_EX                                                  !1
         10        DO_FCALL                                          0  $9      
         11        ASSIGN                                                       !2, $9
    8    12        INIT_FCALL                                                   'var_dump'
         13        SEND_VAR                                                     !2
         14        DO_ICALL                                                     
   10    15        ASSERT_CHECK                                                 
         16        INIT_FCALL                                                   'assert'
         17        FETCH_OBJ_R                                          ~12     !2, 'days'
         18        IS_IDENTICAL                                         ~13     ~12, 0
         19        SEND_VAL                                                     ~13
         20        SEND_VAL                                                     'assert%28%24diff-%3Edays+%3D%3D%3D+0%29'
         21        DO_ICALL                                                     
   11    22        ASSERT_CHECK                                                 
         23        INIT_FCALL                                                   'assert'
         24        FETCH_OBJ_R                                          ~15     !2, 'd'
         25        IS_IDENTICAL                                         ~16     ~15, 0
         26        SEND_VAL                                                     ~16
         27        SEND_VAL                                                     'assert%28%24diff-%3Ed+%3D%3D%3D+0%29'
         28        DO_ICALL                                                     
   12    29        ASSERT_CHECK                                                 
         30        INIT_FCALL                                                   'assert'
         31        FETCH_OBJ_R                                          ~18     !2, 'f'
         32        IS_IDENTICAL                                         ~19     ~18, 1.0e-6
         33        SEND_VAL                                                     ~19
         34        SEND_VAL                                                     'assert%28%24diff-%3Ef+%3D%3D%3D+1.0E-6%29'
         35        DO_ICALL                                                     
   15    36      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.39 ms | 2054 KiB | 15 Q