Andrea Faulds wrote (on 14/07/2014):
On 14 Jul 2014, at 18:24, Rowan Collins <rowan.coll...@gmail.com> wrote:
If the current type hints were only for objects, I would be OK with that, but I
really don't get why an array cast is so different from an int cast.
I’m don’t think the result of casting to array is meaningful or lossless for
anything
Lossless, no. Meaningful, yes.
As mentioned earlier, the behaviour of this statement is as useful as
any other forced cast:
foreach ( (array)$foo as $bar )
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php