mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

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
11 lines
224 B
PHP
11 lines
224 B
PHP
--TEST--
|
|
#[AllowDynamicProperties] cannot be applied to interface
|
|
--FILE--
|
|
<?php
|
|
|
|
#[AllowDynamicProperties]
|
|
interface Test {}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot apply #[AllowDynamicProperties] to interface in %s on line %d
|