|  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
 [2018-03-09 09:25 UTC] mepehok at mailtrix dot net
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?



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-09 10:38 UTC]
-Status: Open +Status: Duplicate
 [2018-03-09 10:38 UTC]
I am closing this as it is a duplicate of and (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]
Duplicate of bug 45002 and bug 62860 (comment formatted properly for linking)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jun 23 14:01:23 2021 UTC