From 0c705633e94b75e1081942c87abffe390f470090 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Mon, 18 Feb 2008 18:12:51 +0000 Subject: [PATCH] Whitespace git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@253169 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/var/functions/gettype.xml | 198 +++++++++++++++------------- 1 file changed, 110 insertions(+), 88 deletions(-) diff --git a/reference/var/functions/gettype.xml b/reference/var/functions/gettype.xml index f2b6681a10..7707a6cd6c 100644 --- a/reference/var/functions/gettype.xml +++ b/reference/var/functions/gettype.xml @@ -1,96 +1,118 @@ - - - - - gettype - Get the type of a variable - - - &reftitle.description; - - stringgettype - mixedvar - - - Returns the type of the PHP variable - var. - - + + + + gettype + Get the type of a variable + + + + &reftitle.description; + + stringgettype + mixedvar + + + Returns the type of the PHP variable + var. + + + + Never use gettype 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. + + + Instead, use the is_* functions. + + + + + + &reftitle.returnvalues; + + Possibles values for the returned string are: + + - Never use gettype 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. + "boolean" (since PHP 4) + + - Instead, use the is_* functions. + "integer" - - - - &reftitle.returnvalues; - - Possibles values for the returned string are: - - - "boolean" (since PHP 4) - - - "integer" - - - "double" (for historical reasons "double" is - returned in case of a float, and not simply - "float") - - - "string" - - - "array" - - - "object" - - - "resource" (since PHP 4) - - - "NULL" (since PHP 4) - - - "user function" (PHP 3 only, deprecated) - - - "unknown type" - - - - - For PHP 4, you should use function_exists and - method_exists to replace the prior usage of - gettype on a function. - - - - &reftitle.seealso; - - - settype - is_array - is_bool - is_float - is_int - is_null - is_numeric - is_object - is_resource - is_scalar - is_string - - - - + + + + "double" (for historical reasons "double" is + returned in case of a float, and not simply + "float") + + + + + "string" + + + + + "array" + + + + + "object" + + + + + "resource" (since PHP 4) + + + + + "NULL" (since PHP 4) + + + + + "user function" (PHP 3 only, deprecated) + + + + + "unknown type" + + + + + + For PHP 4, you should use function_exists and + method_exists to replace the prior usage of + gettype on a function. + + + + + &reftitle.seealso; + + + settype + is_array + is_bool + is_float + is_int + is_null + is_numeric + is_object + is_resource + is_scalar + is_string + + + +