On Wed, Jul 1, 2009 at 7:44 PM, Stanislav Malyshev<s...@zend.com> wrote: > Hi! > >> As far as your point goes, numeric hint addresses it. > > Numeric hint addresses one scenario only. It doesn't address conversions to > strings or booleans, for example (even C allows you to use int as boolean! > :).
I agree. We won't be able to use an int type for something which should take an int. That might not matter in user code, but if we cannot actually type hint internals functions then its a problem. I think it should be a requirement that internals functions should be able to be type hinted using what the manual says. We don't need to be too strict on that, but if that manual says int, it should be hintable with int, and accept "1". My feeling is that scalars should be automatically coerced to the correct type, if it makes sense to do so. (ie reject non-numeric strings for ints). Thanks, Paul -- Paul Biggar paul.big...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php