PHP - How to set explicitly the type of a PHP variable?
You can do this by using the special PHP function settype, the syntax is settype(string var, string type). Type could be "integer", "double", "string", "array" or "object" Be aware that settype returns true if the operation has completed successfully.