3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyDateInterval extends DateInterval { public function tryToChangeDays() { $this->days = "something else"; } } $interval = new MyDateInterval('P2Y4DT6H8M'); var_dump($interval->days); $interval->tryToChangeDays(); var_dump($interval->days);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SrdPh
function name:  (null)
number of ops:  15
compiled vars:  !0 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'MyDateInterval'
          1        SEND_VAL_EX                                              'P2Y4DT6H8M'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   13     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~4      !0, 'days'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   15     8        INIT_METHOD_CALL                                         !0, 'tryToChangeDays'
          9        DO_FCALL                                      0          
   17    10        INIT_FCALL                                               'var_dump'
         11        FETCH_OBJ_R                                      ~7      !0, 'days'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class MyDateInterval:
Function trytochangedays:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SrdPh
function name:  tryToChangeDays
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ                                               'days'
          1        OP_DATA                                                  'something+else'
    8     2      > RETURN                                                   null

End of function trytochangedays

End of class MyDateInterval.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.27 ms | 1395 KiB | 15 Q