If you're having that problem that a request variable is being reported
as an integer, I suggest using var_dump(). That function will tell you
the type and contents of a variable. For example:
$bool = true;
$int = 1;
$float = 1.0;
$str = 'abc';
$array = array();
var_dump($bool, $int, $float,
Antony Dovgal wrote:
And PHP from .deb too?
*That* could be a problem.
God no, If I was doing that, I wouldn't report the bug here :)
Can give you the configure line if it'll help?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 29.11.2005 20:22, Gareth Ardron wrote:
Antony Dovgal wrote:
./sapi/cli/php -r 'var_dump(is_int("jkhdsjh"));'
bool(false)
./sapi/cli/php -v
PHP 5.1.2-dev (cli)
What am I doing wrong?
well that's interesting.
I think it's something to do with the way the var is passed - so could
even be
Florian Anderiasch wrote:
Gareth Ardron wrote:
Hi.
Think I've just stumbled upon a possible bug with is_int.
Hello Gareth,
if I'm not mistaken, $_REQUEST['days'] is a string, and unless you use
if (!is_int(intval($_REQUEST['days'])) || $_REQUEST['days'] < 0) {
I see no problem in is_int ta
./sapi/cli/php -r 'var_dump(is_int("jkhdsjh"));'
bool(false)
./sapi/cli/php -v
PHP 5.1.2-dev (cli)
What am I doing wrong?
On 29.11.2005 18:57, Gareth Ardron wrote:
Hi.
Think I've just stumbled upon a possible bug with is_int.
if you've got the following code:
days::".$_REQUEST['days'];
Gareth Ardron wrote:
> Hi.
>
> Think I've just stumbled upon a possible bug with is_int.
Hello Gareth,
if I'm not mistaken, $_REQUEST['days'] is a string, and unless you use
if (!is_int(intval($_REQUEST['days'])) || $_REQUEST['days'] < 0) {
I see no problem in is_int taking a string with numeral
Hi.
Think I've just stumbled upon a possible bug with is_int.
if you've got the following code:
days::".$_REQUEST['days'];
?>
and somebody enters, say "jkhdsjh" into the form, is_int() returns 1,
thereby not setting the $_REQUEST['days'] variable to 10 - if I switch
to using is_numeric t