3v4l.org

run code in 300+ PHP versions simultaneously
<?php class My_Card{ protected $id; protected $credit; public function setID($id){ $this->id = $id; } public function getID(){ return $this->id; } public function setCredit($credit){ $this->credit = $credit; } public function getCredit(){ return $this->credit ; } } function update($aCard){ $otherCard = $aCard; unset($otherCard->credit); print $aCard->credit; } $aCard = new My_Card(); $aCard->setID('123'); $aCard->setCredit('10.00'); update($aCard);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JGOn8
function name:  (null)
number of ops:  13
compiled vars:  !0 = $aCard
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'My_Card'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_METHOD_CALL                                         !0, 'setID'
          4        SEND_VAL_EX                                              '123'
          5        DO_FCALL                                      0          
   28     6        INIT_METHOD_CALL                                         !0, 'setCredit'
          7        SEND_VAL_EX                                              '10.00'
          8        DO_FCALL                                      0          
   31     9        INIT_FCALL                                               'update'
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function update:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JGOn8
function name:  update
number of ops:  6
compiled vars:  !0 = $aCard, !1 = $otherCard
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        ASSIGN                                                   !1, !0
   22     2        UNSET_OBJ                                                !1, 'credit'
   23     3        FETCH_OBJ_R                                      ~3      !0, 'credit'
          4        ECHO                                                     ~3
   24     5      > RETURN                                                   null

End of function update

Class My_Card:
Function setid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JGOn8
function name:  setID
number of ops:  4
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'id'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function setid

Function getid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JGOn8
function name:  getID
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'id'
          1      > RETURN                                                   ~0
   11     2*     > RETURN                                                   null

End of function getid

Function setcredit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JGOn8
function name:  setCredit
number of ops:  4
compiled vars:  !0 = $credit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        ASSIGN_OBJ                                               'credit'
          2        OP_DATA                                                  !0
   14     3      > RETURN                                                   null

End of function setcredit

Function getcredit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JGOn8
function name:  getCredit
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~0      'credit'
          1      > RETURN                                                   ~0
   17     2*     > RETURN                                                   null

End of function getcredit

End of class My_Card.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.42 ms | 1403 KiB | 14 Q