svn: /phpdoc/en/trunk/reference/var/functions/ gettype.xml
| From: | Justin Martin | Date: | Sat, 28 Jan 2012 00:12:03 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/var/functions/ gettype.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9515@lists.php.net to get a copy of this message | ||
frozenfire Sat, 28 Jan 2012 00:12:03 +0000
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.
Bug: https://bugs.php.net/60900 (Open) Remove the warning
in gettype()'s documentation
Changed paths:
U phpdoc/en/trunk/reference/var/functions/gettype.xml
Modified: phpdoc/en/trunk/reference/var/functions/gettype.xml
===================================================================
--- phpdoc/en/trunk/reference/var/functions/gettype.xml 2012-01-28 00:10:28 UTC (rev 322891)
+++ phpdoc/en/trunk/reference/var/functions/gettype.xml 2012-01-28 00:12:03 UTC (rev 322892)
@@ -13,19 +13,9 @@
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
</methodsynopsis>
<para>
- Returns the type of the PHP variable
- <parameter>var</parameter>.
+ Returns the type of the PHP variable <parameter>var</parameter>. For
+ type checking, use <literal>is_*</literal> functions.
</para>
- <warning>
- <simpara>
- Never use <function>gettype</function> to test for a certain type,
- since the returned string may be subject to change in a future version.
- In addition, it is slow too, as it involves string comparison.
- </simpara>
- <simpara>
- Instead, use the <literal>is_*</literal> functions.
- </simpara>
- </warning>
</refsect1>
<refsect1 role="parameters">