private function typeOf($var) { $type = gettype($var); return $type === 'object' ? get_class($var) : $type; }