On Fri, Mar 9, 2012 at 3:32 AM, Anthony Ferrara <ircmax...@gmail.com> wrote:
> Hey all,
>
> As promised, I've created a POC patch to implement scalar type hints,
> the way that zend_parse_parameters handles hinting.  First off, here's
> the patch:
Thanks for all the hard work you're putting into this :)

> So, what do you think?
This is the proposal I like most. It allows for some type juggling,
but blocks off the ugly edge cases where dataloss would occur.

Thinking in that direction I'd say that the casting rules are still
too lax though:

a) I'm not sure that we really want to accept '123abc' on an int cast
with just a notice. In my eyes that is clearly malformed input, which
should not be accepted.

b) The bool cast rules also accept lots of input with dataloss. At
least the fact that "abc" is considered a valid bool seems odd.

Nikita

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

Reply via email to