3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Paris'); $firstOctober = new \DateTime('2016-10-01 00:00:00'); $endOctober = new \DateTime('2016-10-31 00:00:00'); var_dump( $firstOctober->diff($endOctober)->m );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YLYc9
function name:  (null)
number of ops:  19
compiled vars:  !0 = $firstOctober, !1 = $endOctober
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Europe%2FParis'
          2        DO_ICALL                                                 
    5     3        NEW                                              $3      'DateTime'
          4        SEND_VAL_EX                                              '2016-10-01+00%3A00%3A00'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
    6     7        NEW                                              $6      'DateTime'
          8        SEND_VAL_EX                                              '2016-10-31+00%3A00%3A00'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $6
    9    11        INIT_FCALL                                               'var_dump'
   10    12        INIT_METHOD_CALL                                         !0, 'diff'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0  $9      
         15        FETCH_OBJ_R                                      ~10     $9, 'm'
         16        SEND_VAL                                                 ~10
         17        DO_ICALL                                                 
   11    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.4 ms | 1394 KiB | 17 Q