|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-04-11 21:55 UTC] requinix@php.net
-Status: Open
+Status: Suspended
[2016-04-11 21:55 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
Description: ------------ I would like to suggest to implement anonymous class declaration as done in Java, while maintaining compatibility with current syntax. Currently, in order to extend a class or implement an interface, you would need to write: new class (construct params) extends Base implements Interface { ... } however, this could be simplified as new MyClass { .. } as equivalent to new class() extends MyClass { ... } or else new MyInterface { ... } as equivalent to new class() implements MyInterface { ... } This would also help better those with a Java background use them, even if it is just syntactinc sugar.