Neue Auswahl mit Links zu Nachrichten und Materialien. In der Version: PHP 8-Release-Zeitplan, Objektergonomieanalyse in PHP und 5 neue RFCs von PHP Internals, einige nützliche Tools, Videos, Podcasts und vieles mehr.
Viel Spaß beim Lesen!
 PHP-Interna
- Veröffentlichter PHP-Release-Zeitplan 8 - Das erste Alpha wird am 18. Juni und das endgültige Release am 3. Dezember erwartet. Weitere Details .
 - [RFC] Constructor Property Promotion — PHP, , 3 RFC: Constructor Promotion, Named parameters, Compound Property Visibility ( 
{public get, private set}).
, RFC :
class Point {
    public float $x;
    public float $y;
    public float $z;
    public function __construct(
        float $x = 0.0,
        float $y = 0.0,
        float $z = 0.0
    ) {
        $this->x = $x;
        $this->y = $y;
        $this->z = $z;
    }
}
:
class Point {
    public function __construct(
        public float $x = 0.0,
        public float $y = 0.0,
        public float $z = 0.0
    ) {}
}
 - [RFC] Allow trailing comma in parameter list — , . PHP 7.3.
class Uri {
    private function __construct(
        ?string $scheme,
        ?string $user,
        ?string $pass,
        ?string $host,
        ?int $port,
        string $path,
        ?string $query,
        ?string $fragment // <-- ARGH!
    ) {
        ...
    }
}
 - [RFC] Stricter type checks for arithmetic/bitwise operators — RFC TypeError, , .
var_dump([] % [42]);
 - [RFC] Switch expression — 
switch , :
$expressionResult = switch ($condition) {
    1 => foo(),
    2 => bar(),
    3, 4, 5 => baz(),
};
RFC case: case 3, 4, 5: break; case 3: case 4: case 5: break;. - [RFC] Type casting in array destructuring expressions — :
[(int) $now, (int) $future] = ["2020", "2021"];
[$now, $future] = ["2020", "2021"];
$now = (int) $now;
$future = (int) $future;
, :
...[int $i] = ['a' => '123'];
function foo(...[int $i]) {
}
foo(['a' => '234']);
:
$var = (Foo) [
    'a' => 123,
    'b' => (Bar) [
        'c' => 
    ],
];
 - : Server-Side Request and Response Objects, Userspace operator overloading, Write-Once (readonly) Properties.
 

 Symfony
 Laravel
 Yii

 /
Vielen Dank für Ihre Aufmerksamkeit!
Wenn Sie einen Fehler oder eine Ungenauigkeit bemerken, informieren Sie mich bitte per PM .
Fragen und Vorschläge schreiben Sie an Mail oder Twitter .
Weitere Neuigkeiten und Kommentare zum PHP Digest Telegram Channel .
Link senden
Links nach allen Digests suchen
← Vorherige Version: PHP Digest Nr. 176