Re: RFC: Marking return values as important (#[\NoDiscard])

From: Date: Thu, 30 Jan 2025 12:06:34 +0000
Subject: Re: RFC: Marking return values as important (#[\NoDiscard])
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-126238@lists.php.net to get a copy of this message
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/

« previous php.internals (#126238) next »