3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new \DateTime('2016-03-01'); $date2 = new \DateTime('2016-03-31'); $diff = date_diff($date1, $date2, true); var_dump($diff); // see ["f"]=>float(0)
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jf8qh
function name:  (null)
number of ops:  18
compiled vars:  !0 = $date1, !1 = $date2, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '2016-03-01'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '2016-03-31'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    6     8        INIT_FCALL                                               'date_diff'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !2, $9
    8    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
   10    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.03 ms | 1459 KiB | 15 Q