#php81
Интересный баг в php обнаружил автор phpstan:
https://github.com/php/php-src/issues/7942
Интересный баг в php обнаружил автор phpstan:
readonly
свойства можно мутировать, если им присваивать ссылочные значения.https://github.com/php/php-src/issues/7942
GitHub
Readonly properties mutable when assigning reference to them · Issue #7942 · php/php-src
Description Readonly properties should not be mutable with any means, but the following code surprisingly works (https://3v4l.org/qiDTk): <?php class Foo { public readonly int $bar; public f...
👍3