Re: [RFC] Deprecate dynamic properties
| From: | Côme Chilliet | Date: | Mon, 30 Aug 2021 12:13:42 +0000 |
| Subject: | Re: [RFC] Deprecate dynamic properties | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-115895@lists.php.net to get a copy of this message | ||
Le Wed, 25 Aug 2021 12:02:49 +0200,
Nikita Popov <nikita.ppv@gmail.com> a écrit :
> Hi internals,
>
> I'd like to propose the deprecation of "dynamic properties", that is
> properties that have not been declared in the class (stdClass and
> __get/__set excluded, of course):
>
> https://wiki.php.net/rfc/deprecate_dynamic_properties
If I understand correctly the RFC, in these two classes:
class A {
public $prop;
public function __construct() {
unset($this->prop);
}
}
class B {
public $prop;
}
The property $prop is not in the same state in the end? What is the difference?
isset returns FALSE for both, no? And property_exists?
Is it something that was the same before the RFC and would be different after,
or is it already two different cases and how?
Côme