From: Arvids Godjuks [mailto:arvids.godj...@gmail.com] 
> That's why I described the rules when type juggling comes into play.
> If you send a string number, it is converted from string to number by the 
> type hint. If you send a string of characters and pass it to a int type 
> hinted function - sorry, but it's you who shout yourself with a shotgun, not 
> someone else.

If you are determined to have it this way and cannot yield, then you are off 
topic. This thread was built around the explicit premise that any scalar type 
hint MUST be more forgiving than that, and if we take that away there's quite 
literally nothing more to talk about. Regardless of how anyone feels about it, 
the core devs will never accept what you are insisting on above. (If you want 
proof, look at the prior debates on this issue.) This discussion has no purpose 
unless it can actually accomplish something meaningful, so it started by 
accepting this as a fundamental requirement. Allowing strings to be implicitly 
converted to lower types when possible, regardless of whether the reason 
offends your sense of how code should have been written, is a vital compromise 
in the process of improving the typing in PHP.

John Crenshaw
Priacta, Inc.

Reply via email to