mirror of
https://github.com/danog/psalm.git
synced 2024-12-14 02:07:37 +01:00
ed2cde1b93
This will highlight unused code. Ref: https://github.com/php/php-src/pull/5412 Ref: https://wiki.php.net/rfc/make-reflection-setaccessible-no-op Ref: https://github.com/php/php-src/pull/5411 Example https://3v4l.org/PNeeZ ```php <?php class Foo { private $bar = 'baz'; private function taz() { return 'waz'; } } //var_dump((new ReflectionProperty(Foo::class, 'bar'))->getValue(new Foo)); //var_dump((new ReflectionMethod(Foo::class, 'taz'))->invoke(new Foo)); ``` Produces (starting from PHP 8.1): ``` string(3) "baz" string(3) "waz" ``` |
||
---|---|---|
.. | ||
extensions | ||
CoreGenericClasses.phpstub | ||
CoreGenericFunctions.phpstub | ||
CoreGenericIterators.phpstub | ||
CoreImmutableClasses.phpstub | ||
ext-apcu.phpstub | ||
Php80.phpstub | ||
Php81.phpstub | ||
Php82.phpstub | ||
phpparser.phpstub | ||
phpredis.phpstub | ||
Reflection.phpstub | ||
SPL.phpstub |