Andrea Faulds wrote (on 14/07/2014):
Arguably it’s inconsistent for the scalar and non-scalar type hints to work 
slightly differently, but the point is that we’d be doing what makes sense for 
arrays (no meaningful casts, so we don’t casts) and what makes sense for the 
scalar types (there are common, sensible, meaningful, lossless and equivalent 
casts, so we’ll do them).

Just for the record, I am absolutely on board with not treating array casts as "lossless".

What I am not keen on in is allowing "lossy" casts to int using the same syntax that refuses "lossy" casts to array, which is what Zeev and others are suggesting.

That’s my final word on this matter.

Fair enough. I've probably repeated myself too much as well. :)

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to