#29884 [Opn->Bgs]: incorrect intval return
| From: | tony2001@php.net | Date: | Mon, 30 Aug 2004 04:49:32 +0000 |
| Subject: | #29884 [Opn->Bgs]: incorrect intval return | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65429@lists.php.net to get a copy of this message | ||
ID: 29884
Updated by: tony2001@php.net
Reported By: babansky at cox dot net
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Mandrake 9.2
PHP Version: 4.3.7
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
Read about octal numbers and type-juggling here:
http://www.php.net/manual/en/language.types.integer.php
Previous Comments:
------------------------------------------------------------------------
[2004-08-29 22:57:13] babansky at cox dot net
Description:
------------
if you try to do intval on the following string:
$str_value='09123456789';
you receive the following: 2147483647
Reproduce code:
---------------
$str_value='09123456789';
echo "str_value -> $str_value<BR>";
$num_value=intval($str_value);
echo "num_value -> $num_value<BR>";
Expected result:
----------------
$num_value = 9123456789
Actual result:
--------------
$num_value=2147483647
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29884&edit=1