#41030 [Opn]: intval could not handle numbers bigger than 2,147,483,647

From: Date: Mon, 09 Apr 2007 17:21:37 +0000
Subject: #41030 [Opn]: intval could not handle numbers bigger than 2,147,483,647
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-111241@lists.php.net to get a copy of this message
ID: 41030 User updated by: sedat dot capar at isbank dot net dot tr Reported By: sedat dot capar at isbank dot net dot tr Status: Open Bug Type: Unknown/Other Function Operating System: windows PHP Version: 5.2.1 New Comment: I noticed that I made a mistake in first sentence of description intval("2147483648") returns 214783648 should be intval("2147483648") returns 214783647 Previous Comments: ------------------------------------------------------------------------ [2007-04-09 17:19:37] sedat dot capar at isbank dot net dot tr Description: ------------ intval("2147483648") returns 214783648 this is upper limit for integers however we may use bigint in mysql therefore converting numbers bigger than 214783647 is needed. Reproduce code: --------------- $sayi=intval("2147483648"); print number_format($sayi,","); Expected result: ---------------- 2,147,483,648 Actual result: -------------- 2,147,483,647 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41030&edit=1

« previous php.bugs (#111241) next »