3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface OwnerInterface { public function setData($data); public function getOwnerId($name); public function getOwner($ownerId); } interface AssetInterface { public function setData($data); public function getAssetId($ownerId); public function getAsset($assetId); } class Asset implements AssetInterface, OwnerInterface { protected $assetId; // string or int? DB autogen? protected $assetType; // string protected $assetSubType; protected $ownerId; // protected $owner; // object protected $beneficiary; // string public function setData($data) { } public function getAssetId($ownerId) { } public function getAsset($assetId) { return $this; } public function getAssetType($assetId) { } public function getAssetSubType($assetId) { } public function getOwnerId($name) { } public function getOwner($ownerId) { return $this->owner; // Owner object; I don't think this is the owner object } public function setAssetId($assetId) { } public function setAsset($assetId) { } public function setAssetType($assetId) { } public function setAssetSubType($assetId, $subType) { $this->assetSubType=$subType; } public function setOwnerId($ownerId) { } } ////////////////////////////////////////////////////////// $asset=new Asset(); $assetId="A0001"; $assetType="BUILDING"; $assetSubType="Gas Station"; $ownerId="Current Owner Id"; $asset->$assetId=$assetId; // string or int? DB autogen? $asset->$assetType=$assetType; // string $asset->$ownerId=$ownerId; // $asset->$assetSubType=$assetSubType; // string var_dump($asset);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  (null)
number of ops:  20
compiled vars:  !0 = $asset, !1 = $assetId, !2 = $assetType, !3 = $assetSubType, !4 = $ownerId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   DECLARE_CLASS                                            'asset'
   89     1        NEW                                              $5      'Asset'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
   90     4        ASSIGN                                                   !1, 'A0001'
   91     5        ASSIGN                                                   !2, 'BUILDING'
   92     6        ASSIGN                                                   !3, 'Gas+Station'
   93     7        ASSIGN                                                   !4, 'Current+Owner+Id'
   95     8        ASSIGN_OBJ                                               !0, !1
          9        OP_DATA                                                  !1
   96    10        ASSIGN_OBJ                                               !0, !2
         11        OP_DATA                                                  !2
   97    12        ASSIGN_OBJ                                               !0, !4
         13        OP_DATA                                                  !4
   99    14        ASSIGN_OBJ                                               !0, !3
         15        OP_DATA                                                  !3
  101    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class OwnerInterface:
Function setdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  setData
number of ops:  2
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function setdata

Function getownerid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getOwnerId
number of ops:  2
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function getownerid

Function getowner:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getOwner
number of ops:  2
compiled vars:  !0 = $ownerId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function getowner

End of class OwnerInterface.

Class AssetInterface:
Function setdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  setData
number of ops:  2
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function setdata

Function getassetid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getAssetId
number of ops:  2
compiled vars:  !0 = $ownerId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function getassetid

Function getasset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getAsset
number of ops:  2
compiled vars:  !0 = $assetId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function getasset

End of class AssetInterface.

Class Asset:
Function setdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  setData
number of ops:  2
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   30     1      > RETURN                                                   null

End of function setdata

Function getassetid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getAssetId
number of ops:  2
compiled vars:  !0 = $ownerId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   34     1      > RETURN                                                   null

End of function getassetid

Function getasset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getAsset
number of ops:  4
compiled vars:  !0 = $assetId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   RECV                                             !0      
   38     1        FETCH_THIS                                       ~1      
          2      > RETURN                                                   ~1
   39     3*     > RETURN                                                   null

End of function getasset

Function getassettype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getAssetType
number of ops:  2
compiled vars:  !0 = $assetId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
   43     1      > RETURN                                                   null

End of function getassettype

Function getassetsubtype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getAssetSubType
number of ops:  2
compiled vars:  !0 = $assetId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   RECV                                             !0      
   48     1      > RETURN                                                   null

End of function getassetsubtype

Function getownerid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getOwnerId
number of ops:  2
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   50     0  E >   RECV                                             !0      
   52     1      > RETURN                                                   null

End of function getownerid

Function getowner:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  getOwner
number of ops:  4
compiled vars:  !0 = $ownerId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   54     0  E >   RECV                                             !0      
   56     1        FETCH_OBJ_R                                      ~1      'owner'
          2      > RETURN                                                   ~1
   57     3*     > RETURN                                                   null

End of function getowner

Function setassetid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  setAssetId
number of ops:  2
compiled vars:  !0 = $assetId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   60     0  E >   RECV                                             !0      
   62     1      > RETURN                                                   null

End of function setassetid

Function setasset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  setAsset
number of ops:  2
compiled vars:  !0 = $assetId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   64     0  E >   RECV                                             !0      
   66     1      > RETURN                                                   null

End of function setasset

Function setassettype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  setAssetType
number of ops:  2
compiled vars:  !0 = $assetId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   RECV                                             !0      
   70     1      > RETURN                                                   null

End of function setassettype

Function setassetsubtype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  setAssetSubType
number of ops:  5
compiled vars:  !0 = $assetId, !1 = $subType
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   73     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   75     2        ASSIGN_OBJ                                               'assetSubType'
          3        OP_DATA                                                  !1
   76     4      > RETURN                                                   null

End of function setassetsubtype

Function setownerid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okgta
function name:  setOwnerId
number of ops:  2
compiled vars:  !0 = $ownerId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   79     0  E >   RECV                                             !0      
   81     1      > RETURN                                                   null

End of function setownerid

End of class Asset.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.19 ms | 1408 KiB | 15 Q