On Fri, October 21, 2005 2:39 pm, Chris Knipe wrote:
> Function DoSomething($Blah) {
> $Blah = (int) $Blah;
> return $Blah
> }
>
> $Blah, cannot be larger than 2147483647, and sometimes, I get negative
> integers back from the above function.
>
> This is with PHP 4.4.0 on FreeBSD 5.4-STABLE. C
Also, look at this function:
http://www.php.net/ctype_digit
Jordan
On Oct 21, 2005, at 2:39 PM, Chris Knipe wrote:
Hi,
Uhm... Let's take the below quickly:
Function DoSomething($Blah) {
$Blah = (int) $Blah;
return $Blah
}
$Blah, cannot be larger than 2147483647, and sometimes, I get ne
Hello,
you could treat your variable as a string, and use the is_numeric()
function (but this will include floats, too). To answer your question
precisely and accurately, you may have to do regex matching since you
are out of the bounds of int.
However, why, *exactly*, are you trying to c
Aha :)
Thanks.
> -Original Message-
> From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED]
> Sent: 21 October 2005 22:04
> To: [EMAIL PROTECTED]
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Declaring vars as INT ?
>
> On Fri, 2005-10-21 at 21:39
On Fri, 2005-10-21 at 21:39 +0200, Chris Knipe wrote:
> Function DoSomething($Blah) {
> $Blah = (int) $Blah;
> return $Blah
> }
>
> $Blah, cannot be larger than 2147483647, and sometimes, I get negative
> integers back from the above function.
>
> This is with PHP 4.4.0 on FreeBSD 5.4-STABLE
Hi,
Uhm... Let's take the below quickly:
Function DoSomething($Blah) {
$Blah = (int) $Blah;
return $Blah
}
$Blah, cannot be larger than 2147483647, and sometimes, I get negative
integers back from the above function.
This is with PHP 4.4.0 on FreeBSD 5.4-STABLE. Can anyone else perhaps
co
6 matches
Mail list logo