Re: [PHP-DEV] is_int/is_numeric possible bug

2005-11-29 Thread Unknown W. Brackets
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,

Re: [PHP-DEV] is_int/is_numeric possible bug

2005-11-29 Thread Gareth Ardron
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

Re: [PHP-DEV] is_int/is_numeric possible bug

2005-11-29 Thread Antony Dovgal
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

Re: [PHP-DEV] is_int/is_numeric possible bug

2005-11-29 Thread Gareth Ardron
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

Re: [PHP-DEV] is_int/is_numeric possible bug

2005-11-29 Thread Antony Dovgal
./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'];

Re: [PHP-DEV] is_int/is_numeric possible bug

2005-11-29 Thread Florian Anderiasch
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