Hi Tim,

On 29/01/2025 16:12, Tim Düsterhus wrote:
Hi

Volker and I would like to start discussion on our RFC to allow "Marking return values as important (#[\NoDiscard])".

Please find the following resources for your reference:

- RFC: https://wiki.php.net/rfc/marking_return_value_as_important
- Implementation: https://github.com/php/php-src/pull/17599

I reckon it's a nice thing to have, but to be honest I think handling it just during static analysis would be the best approach. Also there would be no need for a (void) cast to suppress the warning.


Cheers
--
Matteo Beccati

Development & Consulting - http://www.beccati.com/

Reply via email to