PHPackages                             wells5609/php-util - 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. wells5609/php-util

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

wells5609/php-util
==================

Commonly used helpers and utilities for PHP.

2.0.x-dev(11y ago)0291MITPHPPHP &gt;=5.4

Since Sep 12Pushed 11y ago1 watchersCompare

[ Source](https://github.com/wells5609/PHP-Util)[ Packagist](https://packagist.org/packages/wells5609/php-util)[ Docs](https://github.com/wells5609/PHP-Util)[ RSS](/packages/wells5609-php-util/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP-Util
========

[](#php-util)

PHP utility function library.

\##About

- No userland dependencies
- Windows and developer friendly

\###Why I found myself re-implementing the same helper functions/methods over and over again. I decided to stop doing that and created this library instead.

\##Packages The "packages" are just groupings of alike functions.

A non-exhaustive listing:

\####**Arrays**Many `array_*()` functions, e.g.:

- `array_pull()`
- `array_key()` (get a key by relative position)
- `array_map_keys()` (like `array_map()` but for keys)
- `array_filter_keys()` (like `array_filter()` but for keys)

Array "dot-notation":

- `array_get()`
- `array_set()`
- `array_unset()`
- `array_isset()`

e.g.

```
$a = array("some" => array("item" => array("key" => 1)));
array_get($a, "some.item.key") // returns "1"
```

\####**String**Several `str_*()` functions, such as:

- `str_endswith()` and `str_startswith()` (with case-sensitive option)
- `str_sentences()` (sentence extractor)
- `str_alnum()` (strip non-alphanumeric characters)
- `str_numeric()` (detects and casts numeric strings to float or int)

URL-safe Base64 encoding and decoding:

- `base64_url_encode()`
- `base64_url_decode()`

Simple common inflectors:

- `str_pear_case()` (e.g. "Some\_String\_Like\_This")
- `str_snake_case()` (e.g. "some\_string\_like\_this")
- `str_studly_case()` (e.g. "SomeStringLikeThis")
- `str_camel_case()` (e.g. "someStringLikeThis")

\####**Format**String formatting functions:

- `str_format()` (generic string formatter)
- `hash_format()` (e.g. for inserting "-" into UUIDs)
- `phone_format()` (detects format based on length)
- `bytes_format()` (option for SI or IEC)

\####**Sanitize/Validate**Wrappers for common uses of `filter_var()`:

- `sanitize()`
- `validate()`

\####**Filesystem**

- `is_abspath()`
- `joinpath()`
- `globr()` (recursive `glob()`)
- `scandirr()` (recursive `scandir()`)

\####**CSV**

- `file_get_csv()`
- `file_put_csv()`
- `csv2array()`

\####**XML**

- `xml_write_document()`
- `xml_write_element()`
- `xml2array()`

\####**Callables**

- `result()`
- `invoke()` (matches named or ordered parameters to a callable function signature)
- `callable_id()` (human-readable callable identifiers)

\####**Misc**

- `is_xml()`
- `is_json()`
- `is_serialized()`
- `object_to_array()` (no more `*prop => ugly` from casting to array)
- `define_safe()` (define a constant only if undefined)
- `pdo_dsn()` (creates a DSN string for PDO drivers)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

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

4052d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b5b7d38d1408fa7abf81c2650415faa6d135c0725b5a25c5e52aefeac03c455?d=identicon)[wells5609](/maintainers/wells5609)

---

Top Contributors

[![wells5609](https://avatars.githubusercontent.com/u/4088444?v=4)](https://github.com/wells5609 "wells5609 (34 commits)")

---

Tags

utilityhelperscommonextensionutilities

### Embed Badge

![Health badge](/badges/wells5609-php-util/health.svg)

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

###  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.0k538.8k12](/packages/brandonwamboldt-utilphp)[statamic/stringy

A string manipulation library with multibyte support, forked from @statamic

234.5M14](/packages/statamic-stringy)[yiier/yii2-helpers

Helpers for Yii2

116.6k2](/packages/yiier-yii2-helpers)

PHPackages © 2026

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