Hi,

Am 03.03.2025 15:30 schrieb Volker Dusch <vol...@tideways-gmbh.com>:
On Wed, Jan 29, 2025 at 4:12 PM Tim Düsterhus <t...@bastelstu.be> wrote:
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

Hi,

Thank you to everyone who responded to our call for comments on the list here, and to Ondřej who replied on Mastodon to the question if the property would be useful for Static Analysis tools: https://phpc.social/@OndrejMirtes/114040888791921128

Given that the thread has died down, and all points have been discussed, we plan to start the voting later this week unless any important point comes up.

We have also updated the RFC to note that, if (void) is not voted for in the secondary vote, we'd special case `$_` as a discard outlet such that OPcache will not optimize the unused variable.

In this thread, I only found the information that currently OPcache does not discard such unused assignments. It would be good to know if such optimization could be considered to not end up in a situation that such optimization would be useful but can't be applied as of this feature.


Kind Regards,
Volker


Regards,
Marc

Reply via email to