Req #64982 [Opn->Wfx]: gettype(1.545) returns deprecated "double"

From: Date: Wed, 12 Jun 2013 19:52:09 +0000
Subject: Req #64982 [Opn->Wfx]: gettype(1.545) returns deprecated "double"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-179526@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64982&edit=1

 ID:                 64982
 Updated by:         aharvey@php.net
 Reported by:        bas at dmt-software dot nl
 Summary:            gettype(1.545) returns deprecated "double"
-Status:             Open
+Status:             Wont fix
 Type:               Feature/Change Request
 Package:            *General Issues
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

I don't think there's any real value in complicating the implementation of 
gettype() for this, particularly since the type is called double internally 
anyway (for example: the IS_DOUBLE constant in the Zend Engine).


Previous Comments:
------------------------------------------------------------------------
[2013-06-06 22:45:09] bas at dmt-software dot nl

Description:
------------
Currently gettype(1.5456) returns "double" that is deprecated since 4.2.0, it should
return "float". 
The documentation says "for historical reasons "double" is returned", but is it
not just forgotten to change.

If it can not be changed for legacy reasons it might be useful to add an extra parameter (like a
predefined constant) to toggle deprecated "double" or "float" return value.

 



Test script:
---------------
print(gettype(1.15545));



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



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64982&edit=1


Thread (2 messages)

« previous php.bugs (#179526) next »