Quick Table of Contents
[Edit] Type-Related Functions
A few functions are available for both verifying and converting data types.
Retrieving TypesThe gettype() function returns the type of the provided variable. In total, eight possible return values are available: array, boolean, double, integer, object, resource, string, and unknown type. Its prototype follows:string gettype(mixed var) Converting TypesThe settype() function converts a variable to the type specified by type. Seven possible type values are available: array, boolean, float, integer, null, object, and string. If the conversion is successful, TRUE is returned; otherwise, FALSE is returned. Its prototype follows:boolean settype(mixed var, string type)
September 12, 2011
|
Web Development School
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved