3v4l.org

run code in 300+ PHP versions simultaneously
<?php $years = 20; $dob = new \DateTime(); $dob->add(\DateInterval::createFromDateString($years . ' years ago')); var_dump($dob);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gqQlH
function name:  (null)
number of ops:  15
compiled vars:  !0 = $years, !1 = $dob
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 20
    3     1        NEW                                              $3      'DateTime'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
    4     4        INIT_METHOD_CALL                                         !1, 'add'
          5        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
          6        CONCAT                                           ~6      !0, '+years+ago'
          7        SEND_VAL                                                 ~6
          8        DO_FCALL                                      0  $7      
          9        SEND_VAR_NO_REF_EX                                       $7
         10        DO_FCALL                                      0          
    5    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.59 ms | 1394 KiB | 15 Q