Fresh selection with links to news and materials. In the release: everything about fibers and asynchronous PHP, as well as new lambdas, type intersections and other proposals for PHP 8.1. Upcoming events, a portion of useful tools, articles, podcasts, videos and PHP Digest Stream.
Enjoy reading!
news
- Upcoming events:
- April 8 (Thursday), online, Meatup about security from the Tomsk PHP community - Reports from Skyeng, Yii Core Team and 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
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
.
A stream based on the PHP Digest will be hosted by Petr Myazin, the author of the Pyatiminutka PHP podcast, with me today .
We will analyze the news and links from the issue with details and details, and talk with the guest about the plugin for PhpStorm i18n Ally.
Beginning at 19:00 Moscow, Minsk, Kiev.
If you notice an error or inaccuracy, please let us know in a personal habr or telegram .
More news and comments on the PHP Digest Telegram channel .
Send link
Search links in all digests
β Previous issue: PHP-Digest β 200