PHPackages                             wassafr/utilphp - 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. wassafr/utilphp

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

wassafr/utilphp
===============

Form from brandonwamboldt/utilphp

1.1.4(11y ago)02.1kMITPHPPHP &gt;=5.3.3

Since Oct 28Pushed 11y ago1 watchersCompare

[ Source](https://github.com/wassafr/utilphp)[ Packagist](https://packagist.org/packages/wassafr/utilphp)[ RSS](/packages/wassafr-utilphp/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (11)Used By (0)

Util.php [![Build Status](https://camo.githubusercontent.com/408463ac149dbe6af6bca0b546288c2e3d61ba6771e5a2d9b14670864652f642/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6272616e646f6e77616d626f6c64742f7574696c7068702e737667)](https://travis-ci.org/brandonwamboldt/utilphp) [![Coverage Status](https://camo.githubusercontent.com/8af0528ef63edec3ad041eaa2d546c36b1f3a3e90b1dea23d21b3fd5d6fb7a31/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6272616e646f6e77616d626f6c64742f7574696c7068702f6d61737465722e737667)](https://coveralls.io/r/brandonwamboldt/utilphp)
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#utilphp--)

[UtilPHP](http://brandonwamboldt.github.com/utilphp/) (Aka util.php) is a collection of useful functions and snippets that you need or could use every day. It's implemented as a class with static methods, to avoid conflicts with your existing code-base. Just drop it in and start using it immediately.

Included are 55+ functions that provide you with the ability to do common tasks much easier and more efficiently, without having to find that one comment on php.net where you know it's been done already. Access superglobals without checking to see if certain indexes are set first and pass default values, use a nicely formatted var dump, validate emails, generate random strings, flatten an array, pull a single column out of a multidimensional array and much more.

Although it's implemented as one giant class, util.php has extensive documentation and a full suite of unit tests to avoid breaking backwards-compatibility unintentionally.

Release Information
-------------------

[](#release-information)

This repo contains in development code for future releases as well as the current stable branch. Development code is contained in the develop branch.

Changelog and New Features
--------------------------

[](#changelog-and-new-features)

You can find a list of all changes for each release in the [official documentation](http://brandonwamboldt.github.com/utilphp/#changelog)

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

[](#installation)

### Server Requirements

[](#server-requirements)

- PHP version 5.3.3 or higher.

### Standalone File

[](#standalone-file)

Simply drop `util.php` in any project and call `include 'util.php';` in your project. You can then access the `Util` class.

### Composer

[](#composer)

Add the following dependency to your composer.json:

```
"brandonwamboldt/utilphp": "1.0.*"

```

When used with composer, the class is namespaced (`\utilphp\util`) instead of just `util`.

Contributing
------------

[](#contributing)

UtilPHP is a community driven project and accepts contributions of code and documentation from the community. These contributions are made in the form of Issues or [Pull Requests](http://help.github.com/send-pull-requests/) on the [UtilityPHP repository](https://github.com/brandonwamboldt/utilphp) on GitHub.

Issues are a quick way to point out a bug. If you find a bug or documentation error in UtilityPHP then please check a few things first:

- There is not already an open Issue
- The issue has already been fixed (check the develop branch, or look for closed Issues)
- Is it something really obvious that you fix it yourself?

Reporting issues is helpful but an even better approach is to send a Pull Request, which is done by "Forking" the main repository and committing to your own copy. This will require you to use the version control system called Git.

Guidelines
----------

[](#guidelines)

Before we look into how, here are the guidelines. If your Pull Requests fail to pass these guidelines it will be declined and you will need to re-submit when you’ve made the changes. This might sound a bit tough, but it is required for me to maintain quality of the code-base.

### PHP Style

[](#php-style)

Please ensure all new contributions match the [PSR-2](http://www.php-fig.org/psr/psr-2/)coding style guide.

### Documentation

[](#documentation)

If you change anything that requires a change to documentation then you will need to add it. New methods, parameters, changing default values, adding constants, etc are all things that will require a change to documentation. The change-log must also be updated for every change. Also PHPDoc blocks must be maintained.

### PHP Version Compatibility

[](#php-version-compatibility)

UtilityPHP is compatible with PHP 5.3.3 so all code supplied must stick to this requirement.

Of particular note is avoiding short array notation like this:

```
$var = [];

```

Please use the old notation instead:

```
$var = array();

```

I know it's uglier, but PHP 5.3 while EOL'd, still isn't that old.

### Branching

[](#branching)

One thing at a time: A pull request should only contain one change. That does not mean only one commit, but one change - however many commits it took. The reason for this is that if you change X and Y but send a pull request for both at the same time, we might really want X but disagree with Y, meaning we cannot merge the request. Using the Git-Flow branching model you can create new branches for both of these features and send two requests.

License
-------

[](#license)

UtilPHP is licensed under the MIT license.

Resources
---------

[](#resources)

- [Documentation](http://brandonwamboldt.github.com/utilphp/)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 63% 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

Every ~59 days

Recently: every ~13 days

Total

10

Last Release

4097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/877eda4ea7a283f6586e4bb72bba182e3f0267dda97e7d42157b178cdc55d832?d=identicon)[wassafr](/maintainers/wassafr)

---

Top Contributors

[![brandonwamboldt](https://avatars.githubusercontent.com/u/629141?v=4)](https://github.com/brandonwamboldt "brandonwamboldt (160 commits)")[![hopeseekr](https://avatars.githubusercontent.com/u/1125541?v=4)](https://github.com/hopeseekr "hopeseekr (36 commits)")[![abhimanyu003](https://avatars.githubusercontent.com/u/265913?v=4)](https://github.com/abhimanyu003 "abhimanyu003 (14 commits)")[![wassafr](https://avatars.githubusercontent.com/u/10235180?v=4)](https://github.com/wassafr "wassafr (8 commits)")[![lilobase](https://avatars.githubusercontent.com/u/335501?v=4)](https://github.com/lilobase "lilobase (7 commits)")[![wapmorgan](https://avatars.githubusercontent.com/u/6000618?v=4)](https://github.com/wapmorgan "wapmorgan (7 commits)")[![jremes-foss](https://avatars.githubusercontent.com/u/4118513?v=4)](https://github.com/jremes-foss "jremes-foss (5 commits)")[![psaunders88](https://avatars.githubusercontent.com/u/4922659?v=4)](https://github.com/psaunders88 "psaunders88 (3 commits)")[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (2 commits)")[![edito](https://avatars.githubusercontent.com/u/7108513?v=4)](https://github.com/edito "edito (2 commits)")[![navarr](https://avatars.githubusercontent.com/u/145128?v=4)](https://github.com/navarr "navarr (1 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (1 commits)")[![scottchiefbaker](https://avatars.githubusercontent.com/u/3429760?v=4)](https://github.com/scottchiefbaker "scottchiefbaker (1 commits)")[![bradp](https://avatars.githubusercontent.com/u/66798?v=4)](https://github.com/bradp "bradp (1 commits)")[![ARACOOOL](https://avatars.githubusercontent.com/u/539863?v=4)](https://github.com/ARACOOOL "ARACOOOL (1 commits)")[![cbulock](https://avatars.githubusercontent.com/u/176519?v=4)](https://github.com/cbulock "cbulock (1 commits)")[![Gargaj](https://avatars.githubusercontent.com/u/1702533?v=4)](https://github.com/Gargaj "Gargaj (1 commits)")[![bobdenotter](https://avatars.githubusercontent.com/u/1833361?v=4)](https://github.com/bobdenotter "bobdenotter (1 commits)")[![jamesk322](https://avatars.githubusercontent.com/u/260736?v=4)](https://github.com/jamesk322 "jamesk322 (1 commits)")[![melt-snow](https://avatars.githubusercontent.com/u/2076019?v=4)](https://github.com/melt-snow "melt-snow (1 commits)")

---

Tags

phputilityhelperscollection

### Embed Badge

![Health badge](/badges/wassafr-utilphp/health.svg)

```
[![Health](https://phpackages.com/badges/wassafr-utilphp/health.svg)](https://phpackages.com/packages/wassafr-utilphp)
```

###  Alternatives

[brandonwamboldt/utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

1.0k539.0k12](/packages/brandonwamboldt-utilphp)[transprime-research/piper

PHP Pipe method execution with values from chained method executions

174.7k2](/packages/transprime-research-piper)

PHPackages © 2026

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