On Fri, 2008-01-04 at 11:20 -0800, Stanislav Malyshev wrote:
> > Ok but if someone inputs an array in the query string i have a problem
> 
> Which problem? OK, you'd have string "Array" instead once you handle it. 
> If it's a problem, then having "Array" from the start is a problem too.

Yes, and the type hint will catch this problem in a second.

>  > with that. And I said standardized way, ie bool true outputs as "1",
> > float 5.20 outputs as "5.2". For objects, toString is a standardized
> > output but serialization is not, and for arrays no standardized output
> > exists.
> 
> Object serialization is very standardized, it has proper handlers, etc. 
> As for outputting arrays, indeed, 'Array' is not very meaningful, but 
> would "Incompatible type is call in function foo() /foo/bar.php line 
> 123" be better?

Yes it would. Because the developer would fix the error upon seeing an
error message like that, and avoid the entire future problem. Do you
suggest letting the bug go unnoticed until it causes real damage?

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

Reply via email to