PHPackages                             neoan3-apps/ops - 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. neoan3-apps/ops

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

neoan3-apps/ops
===============

neoan3 common string operations helper class

2.1.0(4y ago)0876↓80%5MITPHPCI failing

Since Jun 14Pushed 4y agoCompare

[ Source](https://github.com/sroehrl/neoan3-ops)[ Packagist](https://packagist.org/packages/neoan3-apps/ops)[ RSS](/packages/neoan3-apps-ops/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (2)Versions (21)Used By (5)

neoan3-ops
==========

[](#neoan3-ops)

[![Build Status](https://camo.githubusercontent.com/aafeaa056406fd0f7151fc5bd8c83777740dc52c99645a86f8c6f751b8dcd980/68747470733a2f2f7472617669732d63692e636f6d2f73726f6568726c2f6e656f616e332d6f70732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/sroehrl/neoan3-ops)[![Test Coverage](https://camo.githubusercontent.com/4ec44c151e3fa72b93b5e44acc2752335d382e6ea76db24c54180cf9fc0fdfb0/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f37336361636263323961613134333862333766642f746573745f636f766572616765)](https://codeclimate.com/github/sroehrl/neoan3-ops/test_coverage)[![Maintainability](https://camo.githubusercontent.com/6d13ed104ae1758f428b9ed8b3806fa4bab9335d948a70cfba27dd17c02b17c4/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f37336361636263323961613134333862333766642f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/sroehrl/neoan3-ops/maintainability)

Ops provides valuable string helpers for everyday use ranging from simple templating to encryption &amp; hash generation.

This library facilitates

- [templating](#templating)
- [string-manipulation](#string-manipulation)

Templating
----------

[](#templating)

Templating has grown into a dedicated repository and is now available at [neoan3-apps/template](https://github.com/sroehrl/neoan3-template). For the time being, Ops will inherit functions as if it where part of Ops. However, in new projects we recommend using "Template" instead of "Ops" to trigger templating functionality.

String manipulation
-------------------

[](#string-manipulation)

#### serialize($any)

[](#serializeany)

Serializes strings, arrays and objects (url save).

#### unserialize($serializedString)

[](#unserializeserializedstring)

Reverts serialize()

#### pin($length)

[](#pinlength)

Returns a random integer in the requested length.

#### flattenArray($array)

[](#flattenarrayarray)

Converts deep arrays to keyed arrays of one level to resemble JS-object selection.

```
$original = ['items' => ['name' => 'sam']];
$flat = Ops::flattenArray($original);
/*
* output $flat: ['items.name' => 'sam'];
*
*/
```

#### randomString($length = 10)

[](#randomstringlength--10)

Returns a random string (with or without special characters) in the requested length.

#### encrypt($string, $key)

[](#encryptstring-key)

Encrypts a string with a symmetric AES-256 algorithm.

#### decrypt($encrypted, $key)

[](#decryptencrypted-key)

Decrypts a string with a symmetric AES-256 algorithm.

#### extrude($targets,$array)

[](#extrudetargetsarray)

Returns selected part of $array.

```
$userInput = [
    'id'=>1,
    'name'=>'sam',
    'random'=>'value'
];
$clean = Ops::extrude(['id','name'],$userInput);
// Output $clean: ['id'=>1,'name'=>'sam']
```

#### toPascalCase($string)

[](#topascalcasestring)

Converts spaces, snake-, kebab- or camelCase to PascalCase

#### toCamelCase($string)

[](#tocamelcasestring)

Converts spaces, snake-, kebab- or PascalCase to camelCase

#### toSnakeCase($string)

[](#tosnakecasestring)

Converts spaces, camel-, kebab- or PascalCase to snake\_case

#### toKebabCase($string)

[](#tokebabcasestring)

Converts spaces, camel-, snake- or PascalCase to kebab-case

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

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

Recently: every ~170 days

Total

13

Last Release

1668d ago

Major Versions

0.1.2 → 1.0.12019-09-26

1.1.1 → 2.0.02020-02-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/92d2361b646651e3452a62d07274076346c4096480098a6c43d6c27ee28d460d?d=identicon)[neoan](/maintainers/neoan)

---

Top Contributors

[![sroehrl](https://avatars.githubusercontent.com/u/28542911?v=4)](https://github.com/sroehrl "sroehrl (39 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/neoan3-apps-ops/health.svg)

```
[![Health](https://phpackages.com/badges/neoan3-apps-ops/health.svg)](https://phpackages.com/packages/neoan3-apps-ops)
```

PHPackages © 2026

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