3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
256.7 ms | 1395 KiB | 19 Q