PHPackages                             brainsware/sauce - 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. brainsware/sauce

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

brainsware/sauce
================

Sauce is a general purpose library providing containers and functions that ease development in PHP.

0.2.0(7y ago)251211Apache-2.0PHPPHP &gt;= 5.4.0

Since Mar 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Brainsware/sauce)[ Packagist](https://packagist.org/packages/brainsware/sauce)[ Docs](http://baconphp.net)[ RSS](/packages/brainsware-sauce/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (7)Used By (1)

Sauce is a general purpose library providing containers and functions that ease development in PHP.

Currently Sauce is written and tested for PHP 5.4.x.

Provided classes/traits:

- `Sauce\SObject` - A simple key-value store
- `Sauce\Vector` - A classic array with ordered integer keys
- `Sauce\String` - A simple string representation with utility methods
- `Sauce\Immutable` - An abstract class implementing `ArrayAccess` but denying access to any set methods
- `Sauce\ImmutableObject` - A version of `Object` implemening `Immutable`
- `Sauce\CallableProperty` - A trait implementing `__call` which allows calling a property holding a function - if callable
- `Sauce\AwareObject` - A version of `Object` storing all keys that have been changed
- `Sauce\Path` - A simple path representation with utility methods
- `Sauce\DateTime` - A class extending the original `DateTime` class with sane default formats
- `Sauce\CliColors` - A class for making colored CLI output.

Provided global functions:

- `dump()` - Replacement for `var_dump()` that can take arbitrary data; when not on the command line, this function will wrap the result in a `` tag.
- `sdump()` - Replacement for `var_export($value, true)`
- `V()` - Create a new `Vector` from given data
- `A()` - Create a new `Object` from given data
- `Ar()` - Recursively create `Object` instances from given data (arrays in arrays will be also instantiated as `Object`)
- `S()` - Create a `String` instance from given string
- `Vs()` - Creates a `Vector` instance with given strings, pushing each argument as `String` instance onto the Vector.
- `ensure()` - Define a function/method contract, throws an InvalidArgumentException when contract is not fulfilled. See comments on that function for documentation.
- `is_not_null()` - Check whether given data is not null
- `is_an_array()` - Check whether given data is an array or an instance of any class extending `Object` or implementing `ArrayAccess`
- `is_a_string()` - Check whether given data is a string or an instance of `String`
- `is_cli()` - Check whether the current environment is the command line interface or CGI/mod\_php
- `is_cli_server()` - Check whether the application server running PHP is the built-in server.
- `split_uri()` - Split a string by `/` and remove empty leading/trailing strings
- `path_info()` - Gather PHP's `PATH_INFO` or build it from `SCRIPT_NAME` and `REQUEST_URI`, removes `GET` parameters if present.
- `http_method()` - Returns method reported by the server (`REQUEST_METHOD`), but overrides it if a `_method` parameters was sent with the request. (Useful for resource/CRUD controllers)
- `or_equals()` - Check whether given variable is set and not null, basically mimicking Ruby's or-equals operator (`||=`)
- `has_method($object, $method)` - Check whether or not given object or class has a given method defined.

###  Health Score

27

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~491 days

Total

5

Last Release

2793d ago

### Community

Maintainers

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

---

Top Contributors

[![igalic](https://avatars.githubusercontent.com/u/497249?v=4)](https://github.com/igalic "igalic (4 commits)")[![DKhalil](https://avatars.githubusercontent.com/u/497250?v=4)](https://github.com/DKhalil "DKhalil (2 commits)")

### Embed Badge

![Health badge](/badges/brainsware-sauce/health.svg)

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

###  Alternatives

[paragonie/blakechain

Hash chain using BLAKE2b

242.9k3](/packages/paragonie-blakechain)

PHPackages © 2026

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