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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
2 + 26 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC