Derick Rethans wrote:
On Tue, 15 Nov 2005, Rasmus Lerdorf wrote:
Derick Rethans wrote:
On Tue, 15 Nov 2005, Andrei Zmievski wrote:
Perhaps, but I would maintain that passing "123abc" and having it
interpreted
as 123 is still wrong.
Yeah, I lean that way too, although trailing whitespace should be supported
IMO.
I don't like having two different ways to cast things and I think we would
break a lot of stuff if (int)"123abc" no longer resulted in 123.
Sure, I'm not suggesting to change the cast. But it's IMO good to treat
anything except trailing zeroes as "broken" for these kinds of things in
the parameter parsing API.
That seems rather arbitrary to me. So trailing spaces or trailing
whitespace? Tabs ok? Carriage returns too? If not, why not? Why not
just have a single consistent way to cast things?
-Rasmus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php