Seleksi segar dengan tautan ke berita dan bahan. Dalam masalah ini: 4 proposal RFC yang diterima untuk PHP 8, termasuk atribut (anotasi / dekorator), sebagian alat yang berguna, konferensi dan pertemuan online, video, podcast, dan banyak lagi.
Selamat membaca!
Berita dan Siaran
PHP Internals
- [RFC] Attributes v2 โ PHP 8 ( / )
<< >>
.
<<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;
. Benjamin Eberlei <<Deprecated>>
, trigger_error
:
<<Deprecated>>
function test() {}
<<Deprecated("use test3() instead")>>
function test2() {}
- [RFC] Allow trailing comma in parameter list โ PHP 8 .
class Uri {
private function __construct(
?string $scheme,
?string $user,
?string $pass,
?string $host,
?int $port,
string $path,
?string $query,
?string $fragment, // <-- !
) {
...
}
}
- [RFC] Change Default PDO Error Mode โ PDO
PDO::ERRMODE_EXCEPTION
SQL . - [RFC] Stricter type checks for arithmetic/bitwise operators โ , PHP 8
TypeError
, , . - [RFC] Type casting in array destructuring expressions โ .
- [RFC] Always available JSON extension โ JSON .
- [RFC] Match expression โ
match
, :
match ($x) {
0 => {
foo();
bar();
baz();
},
}
, feature-freeze PHP 8 , RFC .
Symfony
Laravel
Yii
Async PHP
/
!
โ , , .
.
Telegram- PHP Digest.
โ : PHP- โ 178