3v4l.org

run code in 300+ PHP versions simultaneously
<?php $DAY = 1; class Days{ function __construc($d){ $this->day = $d ; } function addToDate(){ $this->day = $this->day + $DAY; return $this->day; } function modifyDay($d){ $DAY = $d; } } $p = new Days(5); echo $p->addToDate(); $p->modifyDay(8); echo $p->addToDate();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PNfGr
function name:  (null)
number of ops:  15
compiled vars:  !0 = $DAY, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
   15     1        NEW                                              $3      'Days'
          2        SEND_VAL_EX                                              5
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   16     5        INIT_METHOD_CALL                                         !1, 'addToDate'
          6        DO_FCALL                                      0  $6      
          7        ECHO                                                     $6
   17     8        INIT_METHOD_CALL                                         !1, 'modifyDay'
          9        SEND_VAL_EX                                              8
         10        DO_FCALL                                      0          
   18    11        INIT_METHOD_CALL                                         !1, 'addToDate'
         12        DO_FCALL                                      0  $8      
         13        ECHO                                                     $8
         14      > RETURN                                                   1

Class Days:
Function __construc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PNfGr
function name:  __construc
number of ops:  4
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'day'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function __construc

Function addtodate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PNfGr
function name:  addToDate
number of ops:  7
compiled vars:  !0 = $DAY
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~2      'day'
          1        ADD                                              ~3      ~2, !0
          2        ASSIGN_OBJ                                               'day'
          3        OP_DATA                                                  ~3
    9     4        FETCH_OBJ_R                                      ~4      'day'
          5      > RETURN                                                   ~4
   10     6*     > RETURN                                                   null

End of function addtodate

Function modifyday:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PNfGr
function name:  modifyDay
number of ops:  3
compiled vars:  !0 = $d, !1 = $DAY
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        ASSIGN                                                   !1, !0
          2      > RETURN                                                   null

End of function modifyday

End of class Days.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.97 ms | 1395 KiB | 13 Q