Re: testing filter ext in RC1

From: Date: Wed, 26 Jul 2006 18:29:40 +0000
Subject: Re: testing filter ext in RC1
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-24991@lists.php.net to get a copy of this message
Hi, On 7/26/06, Kevin Waterson <kevin@oceania.net> wrote:
<?php $var=1234; echo filter_data($var, FILTER_VALIDATE_INT); ?> should the return values be either NULL or 1234? well, it should return 1234
It does.
if var was abc1234 then it would return NULL, is that correct?
False if the value is not valid, null if the value does not exist (for example with input_get or input_get_args). In the case of filter_data, as you pass the variable, it will be either false or the correct value. Cheers, --Pierre

« previous php.internals (#24991) next »