Download the PHP package rayblair/unicode without Composer
On this page you can find all versions of the php package rayblair/unicode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package unicode
Unicode PHP Class
A well-structured and easy-to-use PHP class providing access to Unicode utilities. This class allows working with Unicode characters in a type-safe and explicit manner for PHP applications by providing constants and methods to retrieve subsets of characters, escape Unicode sequences, and more.
⚡ Features
- Unicode constants for type-safe and explicit declarations
- Retrieve all Unicode constants defined in the class
- Fetch a subset of Unicode constants by count or range
- Convert UTF-8 characters to Unicode escape sequences
- Provides structured access to Unicode symbols
- Ensures strict type safety for better maintainability
🔥 Example
🚀 Installation
- Install via Composer:
📚 Usage
Basic Usage
⚙️ Methods
getAll()
Returns an associative array of all defined Unicode constants.
Output Example:
get(int $count)
Returns a subset of Unicode constants up to the given count.
range(string $start, string $end)
Returns a subset of Unicode constants within a specified Unicode hex range.
Output:
escape(string $utf8String)
Converts UTF-8 characters into Unicode escape sequences (\uXXXX
).
🌍 Compatibility
- PHP 8.0 and above
🚀 Contribution
Contributions are welcome! If you have improvements or additional Unicode symbols to add, feel free to:
- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request
⚖️ License
This project is licensed under the MIT License. See the LICENSE file for more details.
📞 Contact
For issues or suggestions, feel free to open an issue on GitHub.
⭐ Support
If you find this project useful, consider giving it a ⭐ on GitHub!