3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Helsinki'); $n = new DateTime("Tue, 24 May 2022 17:35:00 +0300"); $now = new DateTime('2022-05-24 17:36:00'); $diff_n = $n->diff($now); echo '$diff_n->y: ', $diff_n->y;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vmblR
function name:  (null)
number of ops:  19
compiled vars:  !0 = $n, !1 = $now, !2 = $diff_n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Europe%2FHelsinki'
          2        DO_ICALL                                                 
    4     3        NEW                                              $4      'DateTime'
          4        SEND_VAL_EX                                              'Tue%2C+24+May+2022+17%3A35%3A00+%2B0300'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $4
    5     7        NEW                                              $7      'DateTime'
          8        SEND_VAL_EX                                              '2022-05-24+17%3A36%3A00'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $7
    7    11        INIT_METHOD_CALL                                         !0, 'diff'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $10     
         14        ASSIGN                                                   !2, $10
    9    15        ECHO                                                     '%24diff_n-%3Ey%3A+'
         16        FETCH_OBJ_R                                      ~12     !2, 'y'
         17        ECHO                                                     ~12
   10    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.57 ms | 997 KiB | 14 Q