PHP Annotated Monthly – January 2019

Posted on by

Greetings everyone,

Please welcome our first PHP Annotated Monthly of this year, with all the latest news and notable materials coming up from the world of PHP. Read all about the PHP updates, PHPStan, Psalm, Deployer, and other releases. There is news from PHP Internals, Laravel, Yii, and Symfony, some async PHP stuff, useful tools, and a whole lot more!



⚡️ News & Releases

🐘 PHP Internals

[RFC] Typed Properties 2.0 — Nikita announced that the feature is ready and merged now. It is recommended to try it out sooner rather than later, so any problems can be revealed in the early stages. Rasmus Schultz with his blog post is considering possible design flaws when using typed properties.

The fun thing is that with typed properties in PHP 7.4 you can emulate typed variables using classes and a reference: <?php declare(strict_types = 1); $a = new class { public ?string $v; }; $typedVariable = &$a->v; $typedVariable = 'foo'; // Ok $typedVariable = 123; // TypeError There is already a library which implements this idea azjezz/typed.

The fun thing is that with typed properties in PHP 7.4 you can emulate typed variables using classes and a reference: [PHP] FFI — Despite some concerns about security and stability, the voting for FFI has passed successfully, and the proposal is now accepted. It means that the feature will be delivered with the next major release.

🛠 Tools

Symfony

Laravel

Yii

🌀 Async PHP

🚨 Security

💡 Misc

Thanks for reading!

Your JetBrains PhpStorm Team

The Drive to Develop