3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bithdayDate = "1993-03-20"; $date = new DateTime($bithdayDate); $now = new DateTime(); $interval = $now->diff($date); return $interval->y;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhqu3
function name:  (null)
number of ops:  15
compiled vars:  !0 = $bithdayDate, !1 = $date, !2 = $now, !3 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1993-03-20'
    4     1        NEW                                              $5      'DateTime'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
    5     5        NEW                                              $8      'DateTime'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $8
    6     8        INIT_METHOD_CALL                                         !2, 'diff'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $11     
         11        ASSIGN                                                   !3, $11
    7    12        FETCH_OBJ_R                                      ~13     !3, 'y'
         13      > RETURN                                                   ~13
         14*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.96 ms | 1393 KiB | 13 Q