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.
, 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 manyothers .
[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.
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 !
php-vcr / phpunit-testlistener-vcr - Records HTTP responses in your tests and then “plays” them during subsequent test runs, thereby speeding up the runs and determining the result. Usage example .
mpratt / Embera - A library for conveniently obtaining meta-information about pages by URL (oembed, opengraph, twitter-cards, images, code for shredding, etc.).
Five-minute PHP No. 60: Testing in Vimbox (SkyEng) - On the importance of self-tests and plans to develop a testing culture in a team. Inverted Testing Pyramid. TDD or not? Tests first or tests later? Why do we need tests and how to convince colleagues of this?
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.