3v4l.org

run code in 300+ PHP versions simultaneously
<?php $interval = new \DateInterval('PT0S'); $unit = 'h'; $interval->$unit += 0; var_dump($interval->h);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XP384
function name:  (null)
number of ops:  12
compiled vars:  !0 = $interval, !1 = $unit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateInterval'
          1        SEND_VAL_EX                                              'PT0S'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    4     4        ASSIGN                                                   !1, 'h'
    5     5        ASSIGN_OBJ_OP                                 1          !0, !1
          6        OP_DATA                                                  0
    6     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~7      !0, 'h'
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.89 ms | 1000 KiB | 14 Q