From:             babansky at cox dot net
Operating system: Mandrake 9.2
PHP version:      4.3.7
PHP Bug Type:     Strings related
Bug description:  incorrect intval return

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 bug report at http://bugs.php.net/?id=29884&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=29884&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29884&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29884&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=29884&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=29884&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=29884&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=29884&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=29884&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=29884&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=29884&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=29884&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=29884&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=29884&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=29884&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=29884&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=29884&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=29884&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=29884&r=float

Reply via email to