Quick Table of Contents
[تحسين] 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)
12 / سبتمبر / 2011 الساعة 17:59
|