php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #76072 support __getStatic, __setStatic, and all
Submitted: 2018-03-09 09:25 UTC Modified: 2018-03-09 10:38 UTC
From: mepehok at mailtrix dot net Assigned:
Status: Duplicate Package: *General Issues
PHP Version: 7.2.3 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mepehok at mailtrix dot net
New email:
PHP Version: OS:

 

 [2018-03-09 09:25 UTC] mepehok at mailtrix dot net
Description:
------------
I know I "shouldn't be using magic methods", there's no need to repeat it every time this feature is requested, but the reality is that they are useful in certain circumstances, like testing.

No one is asking to allow static class properties to be dynamically defined.

From my understanding of php source code, this is already possible, but it is not enabled in user code. Can we please have this implemented without making it a big deal about code cleanness and kinda arguments that are not really helpful?

Thanks.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-09 10:38 UTC] daverandom@php.net
-Status: Open +Status: Duplicate
 [2018-03-09 10:38 UTC] daverandom@php.net
I am closing this as it is a duplicate of https://bugs.php.net/bug.php?id=45002 and https://bugs.php.net/bug.php?id=62860 (and possibly others).

Please note that this is *not* a comment on the validity of the request, simply an attempt to keep the bug database tidy.

Since the other two issue are old and appear not to be moving anywhere, the best thing to do in order to get something done would likely be to raise it on internals. In fact, if you can, the best thing to do would be to create an implementation and write an RFC, if you do that then you will probably find that everyone suddenly has an opinion. Personally, I think this would have a pretty reasonable chance of passing if someone implemented it.
 [2018-03-09 10:44 UTC] daverandom@php.net
Duplicate of bug 45002 and bug 62860 (comment formatted properly for linking)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 25 15:01:32 2024 UTC