3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.92 ms | 1386 KiB | 15 Q