protected function isPropertyNameNormal($propName)
    {
        static $cache = array();

        if (isset($cache[$propName])) {
            return $cache[$propName];
        }

        // The first regex detects all allowed characters.
        // For some reason, they also allow BOM characters.
        return $cache[$propName] = (bool) preg_match("/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/", $propName) &&
            !(bool) preg_match("/[\xEF\xBB\xBF]$/", $propName);
    }