PageRenderTime 37ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/MAC/.vim/phpdoc/doc/settype.txt

https://bitbucket.org/IvanKruchkoff/dev-profile
Plain Text | 36 lines | 21 code | 15 blank | 0 comment | 0 complexity | 13998c598c4240d608ffb12694983221 MD5 | raw file
  1. settype -- Set the type of a variable
  2. bool settype(mixed var, string type)~
  3. Set the type of variable {var} to {type}.
  4. Possibles values of {type} are: "boolean" (or, since PHP 4.2.0, "bool")
  5. "integer" (or, since PHP 4.2.0, "int")
  6. "float" (only possible since PHP 4.2.0, for older versions use the deprecated
  7. variant "double")
  8. "string"
  9. "array"
  10. "object"
  11. "null" (since PHP 4.2.0)
  12. Returns TRUE on success or FALSE on failure.
  13. |settype| example
  14. <?php >
  15. $foo = "5bar"; // string
  16. $bar = true; // boolean
  17. settype($foo, "integer"); // $foo is now 5 (integer)
  18. settype($bar, "string"); // $bar is now "1" (string)
  19. ?>
  20. See also |gettype|, type-casting and type-juggling.
  21. vim:ft=help: