Fresh selection with links to news and materials. In the release: PSR-14 Event Dispatcher, JIT in PHP 8, three RFC sentences from PHP Internals, a portion of useful tools, and much more are adopted.
Enjoy reading!
EventDispatcherInterface
, StoppableEventInterface
and ListenerProviderInterface
, and also describes the characteristics that all elements and implementation guidelines should follow. Read more in the series of posts from one of the participants of the working group of the standard Larry Garfield.object
, which is available only in PHP 7.2+, it is not possible to use the standard directly in Symfony..
and math +
, -
have the same priority and run from left to right. It is proposed to lower the priority of concatenation: echo "sum: " . $a + $b; // echo ("sum: " . $a) + $b; // echo "sum :" . ($a + $b);
(?int)$x
in addition to (int)$x
....
for arrays. The updated offer removed support for arrays with non-numeric keys. $parts = ['apple', 'pear']; $fruits = ['banana', 'orange', ...$parts, 'watermelon']; // ['banana', 'orange', 'apple', 'pear', 'watermelon'];
Thanks for attention!
')
If you notice an error or inaccuracy - please inform the PM .
Write questions and suggestions by mail or twitter .
More news and comments on the PHP Digest Telegram channel.
Send link
Search links for all digests
← Previous release: PHP Digest number 152
Source: https://habr.com/ru/post/447130/
All Articles