-
-
Notifications
You must be signed in to change notification settings - Fork 929
Closed
Description
Feature request
Rust refers to functions that should not discard their return values when used on a separate line as #[must_use]
, regardless of whether they have side effects. Similarly, PhpStorm marks such functions with #[Pure(true)]
.
ob_get_contents()
is clearly an impure function with state, but it doesn't make sense to write ob_get_contents();
on a separate line. #[Pure(true)]
means that.
refs phpstan/phpstan-src#3867 (comment)
refs #11101
Did PHPStan help you today? Did it make you happy in any way?
Tomorrow is the last day of my two-week spring internship at the company that employs me. The intern, who didn't know PHPStan, can now teach me the inner mechanisms of it. 🥰
Metadata
Metadata
Assignees
Labels
No labels