|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #56621 Functionality to make a class inerit a class / implement an interface
Submitted: 2005-10-29 02:06 UTC Modified: 2011-10-27 07:16 UTC
From: Assigned: sebastian (profile)
Status: Closed Package: runkit (PECL)
PHP Version: 5_1 CVS-2005-10-29 (dev) OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2005-10-29 02:06 UTC]
Two new functions that make a class inherit from another class (if it does not have a parent class, yet) and implement an interface (if it implements the required methods), respectively, would be nice.

Reproduce code:
class ParentClass {}
class ChildClass {}

runkit_inherit_class('ChildClass', 'ParentClass');

interface I {public function doSomething();}
class C {public function doSomething() {}}

runkit_implement_interface('C', 'I');

Expected result:
class ChildClass extends ParentClass {}
class C implements I {public function doSomething() {}}


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-29 17:13 UTC]

Implementing interfaces can go on the to-do though...
 [2011-10-27 07:16 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: sebastian
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 21 15:01:26 2024 UTC