3v4l.org

run code in 300+ PHP versions simultaneously
<?php $birth = new DateTime('1986-08-13 00:00:00'); $now = new DateTime(); echo $birth->diff($now)->year;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vso4c
function name:  (null)
number of ops:  13
compiled vars:  !0 = $birth, !1 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              '1986-08-13+00%3A00%3A00'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    3     4        NEW                                              $5      'DateTime'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
    4     7        INIT_METHOD_CALL                                         !0, 'diff'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $8      
         10        FETCH_OBJ_R                                      ~9      $8, 'year'
         11        ECHO                                                     ~9
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.73 ms | 1393 KiB | 13 Q