3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new \DateTime('now'); $dob = new \DateTime('1981-02-10'); $interval = $now->diff($dob); echo $interval->y;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1aQPr
function name:  (null)
number of ops:  15
compiled vars:  !0 = $now, !1 = $dob, !2 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              'now'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '1981-02-10'
          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        FETCH_OBJ_R                                      ~11     !2, 'y'
         13        ECHO                                                     ~11
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.01 ms | 1397 KiB | 13 Q