php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80401 Inaccurate documentation on gettype (for Integer)
Submitted: 2020-11-23 00:07 UTC Modified: 2020-11-23 01:59 UTC
From: receive dot attachments at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: receive dot attachments at gmail dot com
New email:
PHP Version: OS:

 

 [2020-11-23 00:07 UTC] 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"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-23 01:59 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2020-11-23 02:00 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=75a1a31dc097f349058c8ac42a7b2e2d0f675f3e
Log: Fix #80401: Inaccurate documentation on gettype (for Integer)
 [2020-11-23 02:00 UTC] phpdocbot@php.net
-Status: Verified +Status: Closed
 [2020-11-23 02:35 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=6698ada3054c882962441b493e6d78152d3a0f6f
Log: Fix #80401: Inaccurate documentation on gettype (for Integer)
 [2020-12-30 11:58 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=5e1df941017dbb2ed7a7a8d3c5c83d1cba52b2ca
Log: Fix #80401: Inaccurate documentation on gettype (for Integer)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC