[RFC] Cast in foreach

From: Date: Thu, 21 Feb 2019 12:15:47 +0000
Subject: [RFC] Cast in foreach
Groups: php.internals 
Request: Send a blank email to internals+get-104485@lists.php.net to get a copy of this message
Hi internals, I'd like to propose opening an rfc to make the following syntax legal: foreach($array as (int) $i) {} Which would be functionally equivalent to foreach($array as $i) { $i=(int) $i; } Thoughts? Feedback? ~C

« previous php.internals (#104485) next »