Req #15166 [Opn]: Think about generating an E_NOTICE if PHP_INT_SIZE is exceeded

From: Date: Fri, 23 Mar 2012 02:14:15 +0000
Subject: Req #15166 [Opn]: Think about generating an E_NOTICE if PHP_INT_SIZE is exceeded
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8426@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=15166&edit=1 ID: 15166 Updated by: ifeghali@php.net Reported By: daniel dot oconnor at gmail dot com Summary: Think about generating an E_NOTICE if PHP_INT_SIZE is exceeded Status: Open Type: Feature/Change Request Package: Numbers_Words Package Version: CVS PHP Version: 5.2.6 Roadmap Versions: New Comment: if the number is larger than PHP_INT_MAX, it becomes a float. so perhaps we should just test if the argument is int and return an error when its not ? Previous Comments: ------------------------------------------------------------------------ [2008-11-26 08:19:52] doconnor Description: ------------ If you pass in an argument to toWords(); and it's larger than PHP_INT_SIZE; it won't work as expected. The easiest way to work around it is to cast it to a string. This is surprising to junior developers, and we should generate a helpful notice or warning if we can. ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=15166&edit=1

« previous php.pear.bugs (#8426) next »