Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carry0987/php-utils
An invaluable PHP utility library, encompassing a versatile range of static methods for array manipulation, string handling, date-time operations, and much more, streamlined for developers.
https://github.com/carry0987/php-utils
php8 psr-4
Last synced: about 1 month ago
JSON representation
An invaluable PHP utility library, encompassing a versatile range of static methods for array manipulation, string handling, date-time operations, and much more, streamlined for developers.
- Host: GitHub
- URL: https://github.com/carry0987/php-utils
- Owner: carry0987
- License: mit
- Created: 2024-04-02T13:40:29.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-07-21T14:53:15.000Z (4 months ago)
- Last Synced: 2024-10-12T13:20:29.639Z (about 1 month ago)
- Topics: php8, psr-4
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP-Utils
[![Packgist](https://img.shields.io/packagist/v/carry0987/utils.svg?style=flat-square)](https://packagist.org/packages/carry0987/utils)
This Utils library provides a collection of static methods designed to help in various common tasks encountered in PHP development. From manipulating arrays and strings to handling date-time conversions and file paths, this library aims to be a handy tool for PHP developers.## Features
- Array manipulation and ordering
- String handling and sanitization
- Date-time formatting and conversions
- File and directory path normalization
- URL manipulation and redirection
- Custom HTTP headers setting
- Query parameter handling
- Input validation and filtering## Installation
This library can be easily installed via Composer. Run the following command to add it to your project:```bash
composer require carry0987/utils
```## Usage
Utilize the static methods provided by the `Utils` class in your code without instantiating the class. Here's an example on how to use the array sorting feature:```php
use carry0987\Utils\Utils;$array = [
['id' => 3, 'name' => 'Alice'],
['id' => 1, 'name' => 'Charlie'],
['id' => 2, 'name' => 'Bob'],
];$sortedArray = Utils::sortData($array, 'ASC', 'id');
print_r($sortedArray);
```For more detailed information on each method, refer to the inline comments in the source code.
## Contributing
Contributions, issues, and feature requests are welcome. Feel free to check the issues page if you want to contribute.## License
This project is open-sourced software licensed under the [MIT license](LICENSE).