PHP Digest No. 162 (August 1 - 12, 2019)
Fresh selection with links to news and materials. In the issue: About the future of PHP: P ++ or PHP2020, adopted PSR-12, PHP 7.4 beta 2, Slim 4, and other releases, a portion of useful tools, and much more.
Enjoy reading!
News and Releases
PHP internals
- P ++ - Disputes and accusations of PHP Internals regarding the removal of short tags
<?
, explicit transfer of parameters by reference and other discussions in the end resulted in an unexpected proposal from Zeev Surasky - to make a new dialect of PHP. The working title of P ++ is no accident here - Zeev proposes to make a "sister" language, like C ++ for C. It is also assumed that both PHP and P ++ will develop simultaneously within the same runtime.
In the new P ++, it will be possible to implement a lot of revolutionary improvements, clear Legacy, and restore order without thinking about backward compatibility. Also, since the language will have a new name, it will be possible to get rid of the trail of bad reputation. A classic PHP will receive all the goodies like JIT, preload, etc., but retain backward compatibility.
The proposal was expected to meet a lot of counterarguments, and Zeev even tried to answer them by creating the P ++ idea: FAQ . Nevertheless, there are many questions: limited resources (~ 2 people full time working on PHP), community fragmentation, Hack experience, how PHP and P ++ code will really coexist and interact, and many others . - [RFC] Namespace-scoped declares, again - As part of the RFC, Nikita Popov offers a more evolutionary approach to the further development of the language. Namely, the use of optional directives of type
strict_types
.
And there are two possible ways of implementation: fine-grained - according to the directive for each feature; and coarse-grained - when a whole bundle of features is combined into one directive denoting a revision or standard of a language, for example, "PHP2020". Similar to Editions from Rust. - Call for participation: Annotating internal function argument and return types - Want to become a contributor to the PHP core? You can’t imagine a better time to start!
Insufficient information about internal functions in Reflection is a pretty old problem. Fortunately, in PHP 8 everything is already ready to make type support for arguments and return values of built-in functions. Actually, it remains only to add the relevant annotations and for this there is no need to be an expert in S. Nikita made a PR with an example to show the process: https://github.com/php/php-src/pull/4499 Well, then - help is welcome !
Instruments
Symfony
Laravel
Yii
Async php
Learning Materials
Audio Video
Thanks for attention!
If you notice a mistake or inaccuracy - please inform me in PM .
Questions and suggestions write to mail or twitter .
More news and comments on the PHP Digest Telegram Channel.
Send link
Search links for all digests
← Previous release: PHP Digest No. 161
Source: https://habr.com/ru/post/463279/
All Articles