弃用动态属性创建,除非类选择使用 #[\AllowDynamicProperties]
注解。stdClass 允许动态属性。__get()/__set()
魔术方法不受此更改的影响。解决动态属性弃用警告,可以通过以下方式:
#[\AllowDynamicProperties] 添加到
#[\AllowDynamicProperties](这也适用于所有子类)。
弃用 $callable() 语法不接受的可调用对象(但
call_user_func() 接受)。尤其是:
"self::method""parent::method""static::method"["self", "method"]["parent", "method"]["static", "method"]["Foo", "Bar::method"][new Foo, "Bar::method"]"A::method" 或
["A", "method"]。
"${var}" 和 "${expr}" 样式插值
弃用字符串插值的 "${var}" 和 "${expr}" 样式。
Use "$var"/"{$var}" and "{${expr}}", respectively.
Usage of the QPrint, Base64,
Uuencode, and HTML-ENTITIES
'text encodings' is deprecated for all MBString functions.
Unlike all the other text encodings supported by MBString,
these do not encode a sequence of Unicode codepoints, but rather a sequence of raw bytes.
It is not clear what the correct return values for most MBString functions
should be when one of these non-encodings is specified.
Moreover, PHP has separate, built-in implementations of all of them;
for example, UUencoded data can be handled using
convert_uuencode()/convert_uudecode().
弃用内部方法 SplFileInfo::_bad_state_ex()。
弃用 utf8_encode() 和 utf8_decode()。