ң

settype

(PHP 3, PHP 4)

settype - .

bool settype (mixed var, string type)

type var .

type :

  • "boolean" (, PHP 4.2.0, "bool")

  • "integer" (, PHP 4.2.0, "int")

  • "float" ( PHP 4.2.0; "double")

  • "string"

  • "array"

  • "object"

  • "null" ( PHP 4.2.0)

TRUE ; FALSE .

1. settype()
$foo = "5bar"; // string $bar = true; // boolean settype($foo, "integer"); // $foo 5 (integer) settype($bar, "string"); // $bar "1" (string)

. gettype() , .


ң
serialize strval