PHPackages                             salient/utils - 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. salient/utils

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

salient/utils
=============

The utilities component of the Salient toolkit

v0.99.81(6mo ago)066.4k↓27.3%16MITPHPPHP &gt;=7.4

Since Jul 8Pushed 5mo agoCompare

[ Source](https://github.com/salient-labs/toolkit-utils)[ Packagist](https://packagist.org/packages/salient/utils)[ RSS](/packages/salient-utils/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (51)Used By (16)

salient/utils
=============

[](#salientutils)

> The utilities component of the [Salient toolkit](https://github.com/salient-labs/toolkit)

 [![Latest Stable Version](https://camo.githubusercontent.com/b978c1049c392d826a98e1793e98d0cfc71599bbd0d2ce65c09d161b8d1f70c0/68747470733a2f2f706f7365722e707567782e6f72672f73616c69656e742f746f6f6c6b69742f76)](https://packagist.org/packages/salient/toolkit) [![License](https://camo.githubusercontent.com/a69dc21b66521958734e54526bc047b3502cfcec0f337643a14479da7c36506d/68747470733a2f2f706f7365722e707567782e6f72672f73616c69656e742f746f6f6c6b69742f6c6963656e7365)](https://packagist.org/packages/salient/toolkit) [![CI Status](https://github.com/salient-labs/toolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/salient-labs/toolkit/actions) [![Code Coverage](https://camo.githubusercontent.com/9cd7526674c8d5a9d2c8f9150467975632309756513e52ece90427cd2ca97203/68747470733a2f2f636f6465636f762e696f2f67682f73616c69656e742d6c6162732f746f6f6c6b69742f67726170682f62616467652e7376673f746f6b656e3d59306c395a6545747249)](https://codecov.io/gh/salient-labs/toolkit)

---

`salient/utils` provides utility methods via the stateless classes below.

> If your project uses `File::find()` or `File::pruneDir()`, [salient/iterators](https://github.com/salient-labs/toolkit-iterators) must also be installed.

- **`Arr`** works with arrays and other iterables.
- **`Date`** works with date and time values, timezones and intervals.
- **`Debug`** gets data from the call stack.
- **`Env`** manipulates environment variables, loads values from `.env` files, and applies values from the environment to the script.
- **`File`** works with files, streams and paths, and provides filesystem function wrappers that throw an exception on failure.
- **`Format`** makes data human-readable.
- **`Get`** extracts, converts and generates data. For example:
    - `Get::coalesce()` is similar to the SQL `COALESCE()` function
    - `Get::code()` improves upon `var_export()`
    - `Get::copy()` gets a deep copy of an object
    - `Get::eol()` gets a string's end-of-line sequence
    - `Get::uuid()` generates or converts a UUID
- **`Inflect`** converts English words to different forms, e.g. from singular to plural.
- **`Json`** provides JSON function wrappers that throw an exception on failure.
- **`Package`** retrieves information from Composer's runtime API, e.g. the name of the root package.
- **`Reflect`** works with PHP's reflection API.
- **`Regex`** provides `preg_*()` function wrappers that throw an exception on failure.
- **`Str`** manipulates strings. For example:
    - `Str::expandLeadingTabs()` expands leading tabs to spaces
    - `Str::matchCase()` matches the case of one string to another
    - `Str::ngrams()` gets a string's n-grams
    - `Str::snake()` converts a string to snake\_case
    - `Str::splitDelimited()` safely splits strings that contain delimiters
- **`Sys`** retrieves information about the runtime environment, and provides a handler for exit signals (`SIGTERM`, `SIGINT` and `SIGHUP`).
- **`Test`** performs tests on values.

Documentation
-------------

[](#documentation)

[API documentation](https://salient-labs.github.io/toolkit/namespace-Salient.Utility.html) for `salient/utils` tracks the `main` branch of the toolkit's [GitHub repository](https://github.com/salient-labs/toolkit), where further documentation can also be found.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance69

Regular maintenance activity

Popularity30

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity43

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

Every ~10 days

Recently: every ~65 days

Total

50

Last Release

182d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcd9f9fc77a44c95d6abf456a101d31d558bc6d7d2e7e3a2c1f4dd679ced9707?d=identicon)[lkrms](/maintainers/lkrms)

---

Top Contributors

[![lkrms](https://avatars.githubusercontent.com/u/2563783?v=4)](https://github.com/lkrms "lkrms (127 commits)")

### Embed Badge

![Health badge](/badges/salient-utils/health.svg)

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

###  Alternatives

[ocramius/proxy-manager

A library providing utilities to generate, instantiate and generally operate with Object Proxies

5.0k82.4M230](/packages/ocramius-proxy-manager)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[ocramius/package-versions

Provides efficient querying for installed package versions (no runtime IO)

3.2k74.3M117](/packages/ocramius-package-versions)[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M63](/packages/jean85-pretty-package-versions)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.0M188](/packages/icanhazstring-composer-unused)[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k74.6k86](/packages/pocketmine-pocketmine-mp)

PHPackages © 2026

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