On Sun, May 23, 2010 at 7:52 AM, Larry Garfield <la...@garfieldtech.com> wrote: > > Everything that comes back from a database does > so as a string. To wit: [...]
This is not entirely true though. mysqlnd will return native types through PDO or mysqli if you use prepared statements [1] and hopefully other queries someday. [2] As for your example, I think that this usage is within the realm of data validation rather than type checking. The only thing I expect from type checking is to answer this question: "is it an int? Y/N" And that's where the schism is; the "strict" side wants type checking to... well, check the PHP type of a variable. The "weak" side wants to check the contents of a variable. -JD [1] http://blog.ulf-wendel.de/?p=193 [2] http://blog.ulf-wendel.de/?p=198 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php