Just another blog
Thursday, January 20, 2011
PHP improved gettype function
It's short and simple and more informative:
function get_type(&$v) {
return ($type = gettype($v))=="object" ? get_class($v) : $type;
}
Merge of
PHP::gettype
and
PHP::get_class
functions
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment