Fresh selection with links to news and materials. In the release: PHP 7.3 RC2, Codeception 2.5 and other releases, typed properties in PHP 7.4, the concept of preloading the code from Dmitry Stogov, a portion of useful tools, and much more.
Enjoy reading!
Foo&Bar
types. Read more about the intersection and union of types from the author PHPStan . class Example { // All types with the exception of "void" and "callable" are supported public int $scalarType; protected Type $type; private ?Type $nullableType; // Types are also legal on static properties public static iterable $staticProp; // Types can also be used with the "var" notation var bool $flag; // Typed properties may have default values (more below) public string $str = "foo"; public ?string $nullableStr = null; // The type applies to all properties in one declaration public float $x, $y; // equivalent to: public float $x; public float $y; }
@include
directive.Thanks for attention!
If you notice an error or inaccuracy - please inform the PM .
Write questions and suggestions by mail or twitter .
Send link
Search links for all digests
← Previous release: PHP Digest number 139
Source: https://habr.com/ru/post/424949/
All Articles