From 021177a6c51c17113c8e9a57045ce1569e17dbba Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Sun, 22 Apr 2001 09:31:03 +0000 Subject: [PATCH] Corrections to settype(): o] The return type is boolen o] The first param is type of mixed o] Missing boolean type from the list o] Added two examples git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@45653 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/var.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/functions/var.xml b/functions/var.xml index 98c146385e..f8d6efbdac 100644 --- a/functions/var.xml +++ b/functions/var.xml @@ -903,8 +903,8 @@ if (!odbc_execute ($stmt, &$sqldata)) { Description - int settype - string var + boolean settype + mixed var string type @@ -915,6 +915,7 @@ if (!odbc_execute ($stmt, &$sqldata)) { Possibles values of type are: + "boolean" "integer" "double" "string" @@ -925,6 +926,18 @@ if (!odbc_execute ($stmt, &$sqldata)) { Returns true if successful; otherwise returns false. + + + <function>settype</function> example + +$foo = "5bar"; // string +$bar = true; // boolean + +settype($foo, "integer"); // $foo is now 5 (integer) +settype($bar, "string"); // $bar is now "1" (string) + + + See also gettype.