3v4l.org

run code in 500+ PHP versions simultaneously
<?php // \Drupal\Core\Entity\EntityInterface interface EntityInterface { public function id(); // ... } // \Drupal\user\UserInterface interface UserInterface extends EntityInterface { // ... } // \Drupal\user\User class User implements UserInterface { public function id() {} } // \Drupal\Core\Entity\OwnedEntityInterface interface OwnedEntityInterface { public function setOwnerId($id); public function getOwnerId(); } // \Drupal\user\EntityOwnerInterface interface EntityOwnerInterface extends OwnedEntityInterface { public function setOwner(UserInterface $owner); public function getOwner(); } // Example class. class OwnedEntity implements EntityOwnerInterface { public function setOwnerId($id) {} public function getOwnerId() {} public function setOwner(UserInterface $owner) {} public function getOwner() {} } $user = new User(); $entity = new OwnedEntity(); $entity->setOwnerId($user->id());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5ApP
function name:  (null)
number of ops:  16
compiled vars:  !0 = $user, !1 = $entity
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                                'userinterface'
   15     1        DECLARE_CLASS                                                'user'
   26     2        DECLARE_CLASS                                                'entityownerinterface'
   32     3        DECLARE_CLASS                                                'ownedentity'
   39     4        NEW                                                  $2      'User'
          5        DO_FCALL                                          0          
          6        ASSIGN                                                       !0, $2
   40     7        NEW                                                  $5      'OwnedEntity'
          8        DO_FCALL                                          0          
          9        ASSIGN                                                       !1, $5
   41    10        INIT_METHOD_CALL                                             !1, 'setOwnerId'
         11        INIT_METHOD_CALL                                             !0, 'id'
         12        DO_FCALL                                          0  $8      
         13        SEND_VAR_NO_REF_EX                                           $8
         14        DO_FCALL                                          0          
         15      > RETURN                                                       1

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

End of function id

End of class EntityInterface.

Class UserInterface: [no user functions]
Class User:
Function id:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5ApP
function name:  id
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                       null

End of function id

End of class User.

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

End of function setownerid

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

End of function getownerid

End of class OwnedEntityInterface.

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

End of function setowner

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

End of function getowner

End of class EntityOwnerInterface.

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

End of function setownerid

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

End of function getownerid

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

End of function setowner

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

End of function getowner

End of class OwnedEntity.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.66 ms | 2213 KiB | 13 Q