PHP 8.2 RFC: Deprecate dynamic properties

Deprecate dynamic properties
PHP 8.2

RFC Vote: Deprecate dynamic properties

>= 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.

Subscribe to PHP.Watch newsletter for monthly updates

You will receive an email on last Wednesday of every month and on major PHP releases with new articles related to PHP, upcoming changes, new features and what's changing in the language. No marketing emails, no selling of your contacts, no click-tracking, and one-click instant unsubscribe from any email you receive.