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)->format("%R")->years;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Snf1k
function name:  (null)
number of ops:  16
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        INIT_METHOD_CALL                                         $8, 'format'
         11        SEND_VAL_EX                                              '%25R'
         12        DO_FCALL                                      0  $9      
         13        FETCH_OBJ_R                                      ~10     $9, 'years'
         14        ECHO                                                     ~10
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.18 ms | 1393 KiB | 13 Q