On 3 June 2010 23:37, Stas Malyshev <smalys...@sugarcrm.com> wrote: > Validation and typing are entirely different things. Many validation methods > do not require or provide strict typing.
I can't agree more and that's exactly why I want typehints to only check for type, not validate the content of a variable. An "integer" typehint should just check for the "integer" type, not check whether a string would be a valid number. I don't know about those many validation methods, I'm only saying that PHP's bundled validation functions do enforce typing. > Did you just equate databases to mysqlnd? And the notion of "correctly typed > data" only makes sense in a strictly typed language. Did you just intentionally misrepresent my position by quoting just enough words to create an argument? Obviously, mysqlnd only helps if you're using it. So it won't work if you're using MySQL through libmysql (still MySQL) or if your database only supports text, as I was saying a few words below what you quoted. You said "almost all incoming data for PHP are strings." This is incorrect. PHP's own input validation returns non-strings, and PHP's MySQL native driver optionally returns non-strings. Yet, you don't see me claiming that almost all incoming data for PHP is typed. A lot of it is optionally typed. Evidently, typehints too, are optional. -JD -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php