1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00

Deprecate implicit dynamic properties

Writing to a proprety that hasn't been declared is deprecated,
unless the class uses the #[AllowDynamicProperties] attribute or
defines __get()/__set().

RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
This commit is contained in:
Nikita Popov
2021-10-11 15:49:27 +02:00
parent 35a01f86e0
commit 902d64390e
201 changed files with 583 additions and 177 deletions
@@ -54,6 +54,8 @@ function testAccess($c, $ao) {
NULL
string(12) "C::prop.orig"
- Write:
Deprecated: Creation of dynamic property ArrayObject::$prop is deprecated in %s on line %d
string(8) "changed1"
string(8) "changed2"
- Isset: