On 3 June 2010 22:24, Gustavo Lopes <glo...@nebm.ist.utl.pt> wrote: > On Thu, 03 Jun 2010 17:25:53 +0100, Josh Davis <php...@gmail.com> wrote: > >> The only other big source of data is the database. [...]
Emphasis on "big." There's an infinite number of sources (from mashups using XML or JSON to XML-RPC servers or weird setups processing CSV files), some of them can be/are typed, others are not. The two big sources of incoming data are user input and databases, though. And remember that I was only discussing it in response to the claim that "almost all incoming data for PHP are strings." My point was that user input will be correctly typed if you validate it with PHP's bundled extension, as it is commonly recommended, and it's also becoming increasingly easy to get correctly typed data from your database thanks to mysqlnd. Of course it doesn't mean that you won't find some rarer situations where you get strings in place of integers, e.g. if you're reading from a CSV or XML file, or from a database that only uses a text protocol. -JD -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php