php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60900 Remove the warning in gettype()'s documentation
Submitted: 2012-01-27 10:18 UTC Modified: 2012-01-28 00:12 UTC
From: nicolas dot grekas+php at gmail dot com Assigned: frozenfire (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nicolas dot grekas+php at gmail dot com
New email:
PHP Version: OS:

 

 [2012-01-27 10:18 UTC] nicolas dot grekas+php at gmail dot com
Description:
------------
The documentation page for gettype() contains a big warning saying
"the returned string may be subject to change in a future version".

See http://php.net/gettype

But since the release process RFC is now approved, shouldn't this waring be removed a gettype()'s current behavior be marked as stable, for the shake of strict backward compatibility ?

See https://wiki.php.net/rfc/releaseprocess

Also, the doc says that using is_*() functions is faster than using gettype() because of the string comparison. But a switch(gettype($var)) is way faster than a if (is_*()) ... else if (is_*()) ...

Thus, this speed notice is misleading I think.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-28 00:12 UTC] frozenfire@php.net
Automatic comment from SVN on behalf of frozenfire
Revision: http://svn.php.net/viewvc/?view=revision&revision=322892
Log: Removed big, obtrusive warning, and replaced it with a short note about using is_* functions for type-checking. Closes bug #60900.
 [2012-01-28 00:12 UTC] frozenfire@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2012-01-28 00:12 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Mar 29 13:01:26 2020 UTC