FAQ
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.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMar 23, '12 at 1:11a
activeMar 23, '12 at 1:11a
posts1
users1
websitepear.php.net

1 user in discussion

Ifeghali: 1 post

People

Translate

site design / logo © 2022 Grokbase