
Nouvelle sélection avec des liens vers des nouvelles et des documents. Dans la version: tout sur les fibres et PHP asynchrone, ainsi que les nouveaux lambdas, les intersections de types et autres propositions pour PHP 8.1. Événements à venir, une partie d'outils utiles, articles, podcasts, vidéos et PHP Digest Stream.
Bonne lecture!
nouvelles
- Évènements à venir:
- 8 avril (jeudi), en ligne, Meatup sur la sécurité de la communauté PHP Tomsk - Rapports de Skyeng, Yii Core Team et Userstory.
- 24 (), + , PHP- (/PHP Point). .
- 15 (), + , PHP- — , , kPHP, devops Go. .
- 28 (), , , PHP Russia, 2021.
phpcommunity.ru.
Async PHP
- [RFC] Fibers — PHP 8.1
Swoole - .
— , ( ). , . PHP.
$fiber = new Fiber(function (): void { $value = Fiber::suspend('suspend'); echo "Value used to resume fiber: ", $value, "\n"; }); $value = $fiber->start(); echo "Value from fiber suspending: ", $value, "\n"; $fiber->resume('resume'); > : Value from fiber suspending: suspend Value used to resume fiber: resume
, PHP 8.1 ?
. ReactPHP, Amp . , , .
:
• Fibers — PHP 8.1 — RFC PHP.Watch.
• PHP: PHP? — ReactPHP .
PHP 8.1 ext-fiber. , PHP 7.2.
- PHP — : , , /. , PHP «- ».
- Asynchronous PHP — Multiprocessing, Multithreading & Coroutines — PHP core team Laravel.
PHP Internals
- [RFC] Auto-capturing multi-statement closures
Larry Garfield Nuno Moduro .
.
:
$y = 1; $fn1 = fn($x) => $x + $y;
:
$fn2 = function ($x) use ($y): int { // ... return $x + $y; };
:
$c = 1; $foo = fn($a, $b):int { // ... $val = $a * $b; return $val * $c; };
- [RFC] Short Functions
RFC .
// function add(int $a, int $b): int { return $a + $b; } // function add(int $a, int $b): int => $a + $b;
:class Person { public function __construct( private string $firstName, private string $lastName, ) {} public function getFirstName(): string => $this->firstName; public function getLastName(): string => $this->lastName; public function getFullName(): string => $this->firstName . ' ' . $this->lastName; }
, PHP•=>
(, , , match).
•{ ... }
,return
.
•function
.
•fn
, .
• , .
- [RFC] Deprecations for PHP 8.1
. PHP 8.1 dreprecation notice, PHP 9 .
:mysqli::init()
, key(), current(), next(), prev(), and reset() , . - [RFC] Pure intersection types
PHP 8.0 , RFC .
TypeA&TypeB
,instanceof TypeA
instanceof TypeB
.
class A { private Traversable&Countable $countableIterator; public function setIterator(Traversable&Countable $countableIterator): void { $this->countableIterator = $countableIterator; } public function getIterator(): Traversable&Countable { return $this->countableIterator; } }
pure intersection types, union . - [Draft] Add FPM early bootstrapping mode
Benjamin Eberlei ( PHP 8)fpm.bootstrap_file
. , FPM . , FPM-, .
, , , , , , .
- auto_prepend_file.
- PHP JIT/arm64 port — ARM PHP JIT ARM-.
- [RFC] mysqli bind in execute — .
- PeachPie 1.0.0 — 5 PeachPie PHP .NET. PeachPie PHP .NET . : , , .
- sj-i/php-fuse — FFI libfuse — . PHP .
- parsica-php/parsica — :
$parser = between(char('{'), char('}'), atLeastOne(alphaChar()));
- spatie/period — , , , , , .
- pemistahl/grex — Rust, . . , , , .
- i18n Ally JetBrains plugin — PhpStorm Twig PHP YAML, JSON XLIFF .
. Edmund Beinarovic .
Symfony
- symfony/stopwatch , — Ocramius/ProxyManager.
- Twig
- Symfony #743 (22-28 2021)
Laravel
- Laravel Octane — Laracon Online Laravel Swoole RoadRunner.
- Laravel Query — PhpStorm, Eloquent — , , .
- ryangjchandler/orbit — Laravel Eloquent, .
- 100ms -> 40ms -> 1ms Laravel.
PHP
Laracasts: Laravel 8
Laravel Worldwide Meetup #7
Laravel- (8–21 2021)
Yii
- yiisoft/html — Yii 3. HTML.
/
Feature Flags ReactJS PHP — Feature Flags CI/CD ReactJS PHP.
№13 — gRPC.
PHP Internals News #79 — C
new
.
- phpday:
Un flux basé sur PHP Digest sera hébergé par Petr Myazin, l'auteur du podcast PHP Five-Minute , avec moi aujourd'hui .
Nous analyserons les nouvelles et les liens du problème avec des détails et des détails, et parlerons avec l'invité du plugin pour PhpStorm i18n Ally.
À partir de 19h00 Moscou, Minsk, Kiev.
Si vous remarquez une erreur ou une inexactitude, veuillez nous en informer dans un habr personnel ou un télégramme .
Plus d'actualités et de commentaires sur la chaîne PHP Digest Telegram .
Envoyer le lien
Rechercher des liens dans tous les résumés
← Numéro précédent: PHP-Digest № 200