PHP 8.2 RFC: Deprecate dynamic properties
| Deprecate dynamic properties | |
Improvement | |
| PHP 8.2 | |
| Implemented | |
RFC Vote: Deprecate dynamic properties
Implemented
| - | |
| >= 2/3 | |
| Yes: 52No: 25 |
When writing to a property that has not been declared, PHP will silently create a dynamic property instead. In modern code, this is rarely done intentionally. This RFC proposes to deprecate and later remove the creation of dynamic properties. stdClass and __get/__set are not affected by this change.