[php-src] PR #18303: zend_compile: Allow `(void)` in for’s initializer and loop expression

From: Date: Fri, 11 Apr 2025 08:23:49 +0000
Subject: [php-src] PR #18303: zend_compile: Allow `(void)` in for’s initializer and loop expression
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-31373@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/18303 Author: TimWolla The initializer and loop expression of a for() loop only accept expressions, but they act like statements in spirit - their results are completely ignored. Allow (void) there to allow suppressing #[\NoDiscard], since there is no semantic ambiguity of what (void) returns anyways. Fixes php/php-src#18301 ------------ /cc @edorian

« previous php.git-pulls (#31373) next »