On 1 June 2010 20:43, Stas Malyshev <smalys...@sugarcrm.com> wrote:

> It is very frequent that you want number and get "1" instead - almost
> all incoming data for PHP are strings.

I'd like to point out that filter_input() does cast user input to the
right PHP type. And if memory serves, ext/filter is meant to be PHP's
standard way of handling user input. So in terms of incoming data, I'd
consider user input being covered already.

The only other big source of data is the database. Unfortunately, it
seems that mysqlnd experiments in using MySQL's binary protocol for
all queries and not just prepared statements [1] didn't materialize.
But again, the same way filter was one of PHP 5.2's highlights,
mysqlnd is one of PHP 5.3's highlights and the recommended way to
communicate with MySQL, which means that if mysqlnd gained that
ability somewhere down the road then most of incoming data would be
correctly typed already. Emphasis on "would."

-JD

[1] http://blog.ulf-wendel.de/?p=198

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

Reply via email to