3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $datetime1 = new DateTime('2014-07-23'); $datetime2 = new DateTime('2014-12-31'); $interval = $datetime1->diff($datetime2); echo $interval->format('%a')/7;
based on hlqup
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/FXRDI
function name:  (null)
number of ops:  18
compiled vars:  !0 = $datetime1, !1 = $datetime2, !2 = $interval
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NEW                                              $3      :-6
         1        SEND_VAL_EX                                              '2014-07-23'
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $3
   4     4        NEW                                              $6      :-3
         5        SEND_VAL_EX                                              '2014-12-31'
         6        DO_FCALL                                      0          
         7        ASSIGN                                                   !1, $6
   5     8        INIT_METHOD_CALL                                         !0, 'diff'
         9        SEND_VAR_EX                                              !1
        10        DO_FCALL                                      0  $9      
        11        ASSIGN                                                   !2, $9
   6    12        INIT_METHOD_CALL                                         !2, 'format'
        13        SEND_VAL_EX                                              '%25a'
        14        DO_FCALL                                      0  $11     
        15        DIV                                              ~12     $11, 7
        16        ECHO                                                     ~12
        17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0