PHPackages                             pixel418/ubiq - 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. pixel418/ubiq

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

pixel418/ubiq
=============

Functions for readable treatment of string, array &amp; object

v0.5.0(12y ago)830.3k—9.1%1[1 issues](https://github.com/Elephant418/Ubiq/issues)3MITPHPPHP &gt;=5.3.0

Since Jan 11Pushed 12y agoCompare

[ Source](https://github.com/Elephant418/Ubiq)[ Packagist](https://packagist.org/packages/pixel418/ubiq)[ Docs](https://github.com/Pixel418/Ubiq)[ RSS](/packages/pixel418-ubiq/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (23)Used By (3)

Ubiq [![Build Status](https://camo.githubusercontent.com/fdb1dbe1ef550eeb2367433fa8cc89dd783268558968056b7a12a2a78c52e5d4/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f506978656c3431382f556269712e706e67)](http://travis-ci.org/Pixel418/Ubiq)
============================================================================================================================================================================================================================================================

[](#ubiq-)

Functions for readable treatment of string, array &amp; object.

1. [Let's code](#lets-code)
    1.1 [Simple](#simple)
    1.2 [Readable](#readable)
    1.3 [Normalized](#normalized)
2. [Documentation](https://github.com/Pixel418/Ubiq/blob/master/doc/index.md#readme)
    2.1 [String manipulation](https://github.com/Pixel418/Ubiq/blob/master/doc/index.md#string)
    2.2 [Array manipulation](https://github.com/Pixel418/Ubiq/blob/master/doc/index.md#array)
    2.3 [Object manipulation](https://github.com/Pixel418/Ubiq/blob/master/doc/index.md#object)
3. [How to Install](#how-to-install)
4. [How to Contribute](#how-to-contribute)
5. [Author &amp; Community](#author--community)

Let's code
----------

[](#lets-code)

### Simple

[](#simple)

With Ubiq, your treatments are simple.

```
$string = 'example.com/my/path';
\UString::substrBefore( $string, '/' );
// Returns 'example.com'
// Instead of usual implementation: substr( $string, 0, strpos( $string, '/' ) );
```

[↑ top](#readme)

### Readable

[](#readable)

With Ubiq, even your complex treatments still readable.

```
$string = 'example.com/my/path';
\UString::substrBefore( $string, '/' );
// Returns 'example.com'
```

```
\UString::substrBefore( $string, [ '/', '.' ] );
// Returns 'example'
```

```
\UString::substrBeforeLast( $string, [ '/', '.' ] );
// Returns 'example.com/my'
```

[↑ top](#readme)

### Normalized

[](#normalized)

Ubiq has consistent and normalized api.

```
$string = 'my/path';
// Without prefix, the method return the result of the treatment
\UString::startWith( $string, '/' );
// Returns '/my/path'
```

```
$string = 'my/path';
// With 'is' prefix, the method return the result of the test
\UString::isStartWith( $string, '/' );
// Returns FALSE
```

```
$string = 'my/path';
// With 'do' prefix, the method treat by reference
\UString::doStartWith( $string, '/' );
// $string value is now '/my/path'
```

[↑ top](#readme)

How to Install
--------------

[](#how-to-install)

If you don't have composer, you have to [install it](http://getcomposer.org/doc/01-basic-usage.md#installation).

Add or complete the composer.json file at the root of your repository, like this :

```
{
    "require": {
        "pixel418/ubiq": "0.4.*"
    }
}
```

Ubiq can now be [downloaded via composer](http://getcomposer.org/doc/01-basic-usage.md#installing-dependencies).

To use it, you just have to load the composer autoloader :

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

[↑ top](#readme)

How to Contribute
-----------------

[](#how-to-contribute)

1. Fork the Ubiq repository
2. Create a new branch for each feature or improvement
3. Send a pull request from each feature branch to the **develop** branch

If you don't know much about pull request, you can read [the Github article](https://help.github.com/articles/using-pull-requests).

All pull requests must follow the PSR1 standard and be accompanied by passing [phpunit](https://github.com/sebastianbergmann/phpunit/) tests.

[↑ top](#readme)

Author &amp; Community
----------------------

[](#author--community)

Ubiq is under the [MIT License](http://opensource.org/licenses/MIT).
It is created and maintained by [Thomas ZILLIOX](http://tzi.fr).

[↑ top](#readme)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

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 ~19 days

Recently: every ~81 days

Total

21

Last Release

4491d ago

PHP version history (2 changes)v0.1.0PHP &gt;=5.4.0

v0.4.1PHP &gt;=5.3.0

### Community

Maintainers

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

---

Top Contributors

[![tzi](https://avatars.githubusercontent.com/u/415891?v=4)](https://github.com/tzi "tzi (176 commits)")

---

Tags

arraystringutil

### Embed Badge

![Health badge](/badges/pixel418-ubiq/health.svg)

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

###  Alternatives

[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[phootwork/lang

Missing PHP language constructs

1224.8M8](/packages/phootwork-lang)[michaldudek/foundation

A set of useful PHP classes.

13111.9k13](/packages/michaldudek-foundation)[clausnz/php-helpers

A Collection of useful php helper functions.

388.7k](/packages/clausnz-php-helpers)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)

PHPackages © 2026

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