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

 ID:                 64982
 Updated by:         ahar...@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

Reply via email to