PHPackages                             anekdotes/support - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. anekdotes/support

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

anekdotes/support
=================

Utility classes meant to facilitate object manipulation.

2.0.0(4y ago)097116MITPHPPHP &gt;=7.4.0CI failing

Since May 2Pushed 4y ago2 watchersCompare

[ Source](https://github.com/anekdotes/support)[ Packagist](https://packagist.org/packages/anekdotes/support)[ Docs](https://github.com/anekdotes/support)[ RSS](/packages/anekdotes-support/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (3)Versions (18)Used By (6)

Anekdotes Support
=================

[](#anekdotes-support)

[![Latest Stable Version](https://camo.githubusercontent.com/12d5e0c11893c8ad4ac5d17fb6dc5487306caad9dc4b05839e01ae086c6f2f53/68747470733a2f2f706f7365722e707567782e6f72672f616e656b646f7465732f737570706f72742f762f737461626c65)](https://packagist.org/packages/anekdotes/support)[![Build Status](https://camo.githubusercontent.com/fe21143df50f1d98026bf3b4f16c40f79051482fae19f4af0db8e20c2cae9f2f/68747470733a2f2f7472617669732d63692e6f72672f616e656b646f7465732f737570706f72742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/anekdotes/support)[![License](https://camo.githubusercontent.com/9974e726c6cbfc127e9197df6f344d7c0b317aac62a2f149d9924f2db005a0b9/68747470733a2f2f706f7365722e707567782e6f72672f616e656b646f7465732f737570706f72742f6c6963656e7365)](https://packagist.org/packages/anekdotes/support)[![Total Downloads](https://camo.githubusercontent.com/6da4b10e76421d47657af713dae2adc6a9694f4e3af28707bd48d58c7a1fcbcd/68747470733a2f2f706f7365722e707567782e6f72672f616e656b646f7465732f737570706f72742f646f776e6c6f616473)](https://packagist.org/packages/anekdotes/support)

Utility classes meant to facilitate object manipulation

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

[](#installation)

Install via composer into your project:

```
composer require anekdotes/support

```

Usage
-----

[](#usage)

Use the class where ever you need it:

```
use Anekdotes\Support\Arr;
```

or

```
use Anekdotes\Support\Str;
```

or

```
use Anekdotes\Support\UUID;
```

or

```
use Anekdotes\Support\I18n;
```

#### Arr

[](#arr)

Helper class which facilitates array manipulation.

Method `sortByKey` (\**array*, \**string*, *enum*)

```
Arr::sortByKey([['id' => 2],['id' => 1],['id' => 3]], 'id');
// [['id' => 1],['id' => 2],['id' => 3]]

Arr::sortByKey([['id' => 2],['id' => 1],['id' => 3]], 'id', SORT_DESC);
// [['id' => 3],['id' => 2],['id' => 1]]
```

Method `get` (\**array*, \**string*, *string*)

```
Arr::get(['id'=>1, 'title'=>'foo'], 'title');
// foo

//With default param if non is found
Arr::get(['id'=>1, 'title'=>'foo'], 'bar', 'toaster');
// toaster
```

Method `getWhere` (\**array*, \**string*, \**string*, *string*)

```
$dummy = [
    ['id' => 1, 'name' => 'Bell'],
    ['id' => 2, 'name' => 'Lani']
];
Arr::getWhere($dummy, 'name', 'Lani');
// ['id' => 2, 'name' => 'Lani']
```

Method `exists` (\**string*, \**array*)

```
Arr::exists('title', ['id'=>1, 'title'=>'foo']);
// true

Arr::exists('bar', ['id'=>1, 'title'=>'foo']);
// false
```

Method `remove` (\**string*, \**array*)

```
$dummy = ['id'=>1, 'title'=>'foo'];
Arr::remove('title', $dummy);
$dummy // ['id'=>1]

$dummy = ['id'=>1, 'title'=>'foo'];
Arr::remove('foo', $dummy);
$dummy // ['id'=>1, 'title'=>'foo']
```

#### Str

[](#str)

Contains helper functions used to manipulate strings.

Method `startsWith` (\**string*, \**string*)

```
Str::startsWith('foo', 'f');
// true
```

Method `endsWith` (\**string*, \**string*)

```
Str::endsWith('foo', 'o');
// true
```

Method `split` (\**string*, \**string*)

```
Str::split(',', '1,2,3,4,5');
// [1, 2, 3, 4, 5]
```

Method `capitalize` (\**string*)

```
Str::capitalize('foo');
// Foo
```

Method `upper` (\**string*)

```
Str::upper('foo');
// FOO
```

Method `lower` (\**string*)

```
Str::lower('FOO');
// foo
```

Method `snakeCase` (\**string*)

```
Str::snakeCase('étoile filante');
// etoile_filante
```

Method `camelCase` (\**string*)

```
Str::camelCase('foo bar');
// fooBar
```

Method `contains` (\**string*, \**string*)

```
Str::contains('foo', 'oo');
// true
```

Method `studly` (\**string*)

```
Str::studly('foo bar');
// FooBar
```

Method `ascii` (\**string*)

```
Str::ascii('étoile');
// etoile
```

Method `slug` (\**string*, *string*)

```
Str::slug('foo bar');
// foo-bar
```

Method `random` (\**integer*)

```
Str::random();
// random 16 characters string

Str::random(20);
// random 20 characters string
```

Method `quickRandom` (\**integer*)

```
Str::quickRandom();
// random quick 16 characters string

Str::quickRandom(20);
// random quick 20 characters string
```

Method `replace` (\**string*, \**string*, \**string*)

```
Str::replace('foo', 'oo', 'yy');
// fyy
```

Method `regexResult` ()

```
Str::regexResult('/([\w]+)/', 'foo bar', 0);
// ['foo', 'bar']
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 77.3% 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 ~127 days

Recently: every ~454 days

Total

17

Last Release

1681d ago

Major Versions

1.1.0 → 2.0.02021-11-23

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

2.0.0PHP &gt;=7.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17788771?v=4)[Anekdotes](/maintainers/anekdotes)[@anekdotes](https://github.com/anekdotes)

---

Top Contributors

[![franatieu](https://avatars.githubusercontent.com/u/4522233?v=4)](https://github.com/franatieu "franatieu (34 commits)")[![Grasseh](https://avatars.githubusercontent.com/u/2159610?v=4)](https://github.com/Grasseh "Grasseh (10 commits)")

---

Tags

arraystringhelpersauthuuidarrstr

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/anekdotes-support/health.svg)

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.7k51.8M364](/packages/tymon-jwt-auth)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M497](/packages/pimcore-pimcore)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

84611.1M61](/packages/php-open-source-saver-jwt-auth)[oro/platform

Business Application Platform (BAP)

645143.5k114](/packages/oro-platform)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k59](/packages/open-dxp-opendxp)[tg/tgwebvalid

An easy way to validate Telegram Login Widget and Telegram Mini App users on your website using PHP

6725.8k1](/packages/tg-tgwebvalid)

PHPackages © 2026

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