php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #64982 gettype(1.545) returns deprecated "double"
Submitted: 2013-06-06 22:45 UTC Modified: 2013-06-12 19:52 UTC
From: bas at dmt-software dot nl Assigned:
Status: Wont fix Package: *General Issues
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-06-06 22:45 UTC] 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));


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-12 19:52 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2013-06-12 19:52 UTC] aharvey@php.net
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).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 06:01:33 2024 UTC