PHPackages                             olakunlevpn/php-helpers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. olakunlevpn/php-helpers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

olakunlevpn/php-helpers
=======================

PHP Helpers is a versatile and comprehensive collection of PHP utility functions designed to streamline your PHP development process. Whether you're building web applications, APIs, or working on other PHP projects, our package provides an extensive set of tools to simplify common tasks and boost your productivity

1.0.0(2y ago)25MITPHPPHP ^8.1

Since Oct 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/olakunlevpn/php-helpers)[ Packagist](https://packagist.org/packages/olakunlevpn/php-helpers)[ RSS](/packages/olakunlevpn-php-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

php-helpers
===========

[](#php-helpers)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

`php-helpers` is a PHP utility library that provides a collection of useful functions to simplify common tasks in PHP development.

Features
--------

[](#features)

- **JSON Handling**: Easily generate JSON responses with the `json_message` function.
- **Redirects**: Manage redirects, even when headers are already sent, using the `redirect_to` function.
- **URL Manipulation**: Get the current URL, check for AJAX requests, and work with URLs effortlessly.
- **Gravatar Integration**: Generate Gravatar URLs for user avatars.
- **Security**: Handle CSRF tokens and input data sanitization.
- **Array Manipulation**: Manipulate arrays using dot notation with `array_set`, `array_forget`, and `array_get`.
- **String Operations**: Perform various string operations like case conversions and substring checks.
- And more.....

Installation
------------

[](#installation)

You can easily install `php-helpers` using Composer. Run the following command in your project directory:

```
composer require olakunlevpn/php-helpers
```

After installing, you can include the `Util` class in your PHP scripts where you need its functionalities.

```
require_once('vendor/autoload.php');

use Olakunlevpn\PhpHelpers\Util;

// Now you can use Util:: functions
```

Usage
-----

[](#usage)

Here are some examples of how to use the functions provided by `php-helpers`:

```
// Generate a JSON response
Util::json_message("Operation completed successfully", true);

// Redirect to a specific URL
Util::redirect_to("/home");

// Get the current URL
$currentUrl = Util::get_current_url();

// Check if it's an AJAX request
$isAjax = Util::is_ajax_request();

// Generate a Gravatar URL
$gravatarUrl = Util::gravatar("user@example.com", 120, 'identicon', 'pg');

// Generate a avatar with first name and last name
$avatarUrl = Util::avatar("John Timothy");

// Sanitize a string key
$sanitizedKey = Util::sanitize_key("user@123");

// Perform string operations
$studlyString = Util::studly_case("hello_world");
```

For more details and examples, please refer to the [docs](docs/introduction.md).

License
-------

[](#license)

This project is open-source and available under the [MIT License](LICENSE).

Feel free to contribute, report issues, or suggest improvements. Your feedback is valuable!

Happy coding with `php-helpers`!

This updated README provides clear instructions on how users can install `php-helpers` using Composer. Users simply need to run the `composer require` command in their project directory to include the library, and then they can use it in their PHP scripts as shown in the usage examples.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

953d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20794807?v=4)[Olakunlevpn](/maintainers/olakunlevpn)[@olakunlevpn](https://github.com/olakunlevpn)

---

Top Contributors

[![olakunlevpn](https://avatars.githubusercontent.com/u/20794807?v=4)](https://github.com/olakunlevpn "olakunlevpn (3 commits)")

### Embed Badge

![Health badge](/badges/olakunlevpn-php-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/olakunlevpn-php-helpers/health.svg)](https://phpackages.com/packages/olakunlevpn-php-helpers)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
