Doc #80401 [Opn->Ver]: Inaccurate documentation on gettype (for Integer)
| From: | cmb@php.net | Date: | Mon, 23 Nov 2020 01:59:13 +0000 |
| Subject: | Doc #80401 [Opn->Ver]: Inaccurate documentation on gettype (for Integer) | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18149@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80401&edit=1
ID: 80401
Updated by: cmb@php.net
Reported by: receive dot attachments at gmail dot com
Summary: Inaccurate documentation on gettype (for Integer)
-Status: Open
+Status: Verified
Type: Documentation Problem
Package: Unknown/Other Function
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2020-11-23 00:07:23] receive dot attachments at gmail dot com
Description:
------------
On the Gettype page you have mixed messaging, some of which is inaccurate. Early on the page you
report that:
------
Possible values for the returned string are:
"bool"
"int"
...
-----
While further down, you more accurately assert that
-----
The above example will output something similar to:
integer
...
-----
The second statement is accurate, and the first statement is misleading (about the value returned
when dealing with an integer
---
From manual page: https://php.net/function.gettype
---
Test script:
---------------
echo gettype(9);
//print "integer", not "int"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80401&edit=1