Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.18.2

Request #15166 Think about generating an E_NOTICE if PHP_INT_SIZE is exceeded
Submitted: 2008-11-26 13:19 UTC
From: doconnor Assigned:
Status: Open Package: Numbers_Words (version CVS)
PHP Version: 5.2.6 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-11-26 13:19 UTC] doconnor (Daniel O'Connor)
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.

Comments

 [2012-03-23 06:14 UTC] ifeghali (Igor Feghali)
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 ?