带有新闻和资料链接的新鲜选择。问题:4个已接受的PHP 8 RFC提案,包括属性(注释/修饰符),一部分有用的工具,在线会议和会议,视频,播客等。享受阅读!
<< >>
<<ExampleAttribute>> class Foo { <<ExampleAttribute>> public const FOO = 'foo'; <<ExampleAttribute>> public $x; <<ExampleAttribute>> public function foo(<<ExampleAttribute>> $bar) { } } $object = new <<ExampleAttribute>> class () { }; <<ExampleAttribute>> function f1() { } $f2 = <<ExampleAttribute>> function () { }; $f3 = <<ExampleAttribute>> fn () => 1;
<<Deprecated>>
trigger_error
<<Deprecated>> function test() {} // Deprecated: Function test is deprecated in %s <<Deprecated("use test3() instead")>> function test2() {} // Deprecated: Function test2 is deprecated use test3() instead in %s
class Uri { private function __construct( ?string $scheme, ?string $user, ?string $pass, ?string $host, ?int $port, string $path, ?string $query, ?string $fragment, // <-- ! ) { ... } }
PDO::ERRMODE_EXCEPTION
TypeError
match
match ($x) { 0 => { foo(); bar(); baz(); }, }
expect*()
RuntimeInterface
!— , , ..Telegram- PHP Digest.← : PHP- № 178