PHPackages                             sinevia/php-library-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. sinevia/php-library-utils

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

sinevia/php-library-utils
=========================

PHP Library Utils

v3.9.0(1y ago)41.7k25proprietaryPHPCI failing

Since Jan 6Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Sinevia/php-library-utils)[ Packagist](https://packagist.org/packages/sinevia/php-library-utils)[ Docs](http://github.com/sinevia/php-library-utils)[ RSS](/packages/sinevia-php-library-utils/feed)WikiDiscussions master Synced 2w ago

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

PHP Library Utils [![Open in Gitpod](https://camo.githubusercontent.com/6a4edb76a7e92e0faad09a11e42cba7c39803ee6723f8cb1b801f91113d59695/68747470733a2f2f676974706f642e696f2f627574746f6e2f6f70656e2d696e2d676974706f642e737667)](https://gitpod.io/#https://github.com/Sinevia/php-library-utils)
==================================================================================================================================================================================================================================================================================================

[](#php-library-utils-)

The utility library provides multiple helper methods for PHP. These include methods for working with CSV, data, files, strings, etc.

[![No Dependencies](https://camo.githubusercontent.com/e5650883bec05bec967678c8203c32b160b75c93b5b745c80bd9e6f25eb4a3db/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e6f2d646570656e64656e636965732d737563636573732e737667)](https://camo.githubusercontent.com/e5650883bec05bec967678c8203c32b160b75c93b5b745c80bd9e6f25eb4a3db/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e6f2d646570656e64656e636965732d737563636573732e737667)[![Tests](https://github.com/Sinevia/php-library-utils/workflows/Tests/badge.svg)](https://github.com/Sinevia/php-library-utils/workflows/Tests/badge.svg)[![Gitpod Ready-to-Code](https://camo.githubusercontent.com/ec0084907bd5b3576af415a1e46cae636fbfa04da6bf9db6296eae3057a189f0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476974706f642d52656164792d2d746f2d2d436f64652d626c75653f6c6f676f3d676974706f64)](https://gitpod.io/#https://github.com/sinevia/php-library-utils)

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

[](#installation)

### 1. Via Composer

[](#1-via-composer)

```
composer require sinevia/php-library-utils

```

### 2. Manually

[](#2-manually)

Download from

Usage
-----

[](#usage)

```
\Sinevia\Utils::raiseMemoryLimits();
```

Classes and methods
-------------------

[](#classes-and-methods)

### Array Utils

[](#array-utils)

- columns splits the array into columns

```
\Sinevia\ArrayUtils::columns($array);
```

- isAssoc checks whether an array is associative

```
\Sinevia\ArrayUtils::isAssoc($array);
```

- toCsv converts an array to CSV. If the array is associative, the keys will be used for a header row

```
\Sinevia\ArrayUtils::toCsv($array, $forceQuotes=true);
```

### Browser Utils

[](#browser-utils)

- fingerprint

```
\Sinevia\BrowserUtils::fingerprint();
```

### Csv Utils

[](#csv-utils)

- write

```
\Sinevia\CsvUtils::write($filename, $array);
```

### Data Utils

[](#data-utils)

- serialize

```
\Sinevia\DataUtils::serialize($data, $pass);
```

- unserialize

```
\Sinevia\DataUtils::unserialize($data, $pass);
```

### File Utils

[](#file-utils)

### Link Utils

[](#link-utils)

- getBaseUrl

```
\Sinevia\LinkUtils::getBaseUrl(); // ""
```

- setBaseUrl

```
\Sinevia\LinkUtils::setBaseUrl("https://yahoo.com"); // ""
```

- buildUrl

```
\Sinevia\LinkUtils::buildUrl("/", ['a'=>'A', 'b'=>'B']); // "/?a=A&b=B"
```

### String Utils

[](#string-utils)

- between

```
\Sinevia\StringUtils::between("ABCDEFG","B","E"); // "CD"
```

- camelize
- endsWith
- fixNewLines - fixes \\r\\n to \\n
- hasMinumumChars
- hasLowercase
- hasNumber
- hasOnly
- hasSubstring
- hasUppercase
- htmlEmailToText
- isEmail

```
\Sinevia\StringUtils::isEmail("test@test"); // false
```

- isJson

```
\Sinevia\StringUtils::isJson("ABC"); // false
```

- leftFrom
- maxWords
- p2br
- random

```
\Sinevia\StringUtils::rand(8); // "aBDhkDyD"
\Sinevia\StringUtils::rand(8, "ABC"); // "BABCCB"
```

- regexSurround
- regexReplace
- rightFrom
- slugify
- snakify
- splitId
- startsWith
- substringBetween
- toArray

```
\Sinevia\StringUtils::toArray("ABC"); // ["A", "B", "C"]
```

- toWords

### Utils

[](#utils)

- arrayValueDelete
- colorNameToHex
- colorBrightness
- forceFileDownload
- forceFileDownloadFromContent
- getTimeAgo
- ip

```
\Sinevia\Utils::ip();
```

- isCli
- pagination
- paginationReversed
- pathToUrl
- percents
- redirectAndPostData
- redirect
- raiseMemoryLimits
- rssToArray

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 92.2% 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 ~89 days

Recently: every ~397 days

Total

29

Last Release

582d ago

Major Versions

v1.9.0 → v2.0.02019-05-31

v2.9.0 → v3.0.02020-01-29

### Community

Maintainers

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

---

Top Contributors

[![Sinevia](https://avatars.githubusercontent.com/u/3450815?v=4)](https://github.com/Sinevia "Sinevia (71 commits)")[![lesichkovm](https://avatars.githubusercontent.com/u/7744963?v=4)](https://github.com/lesichkovm "lesichkovm (6 commits)")

---

Tags

phplibraryutilssinevia

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sinevia-php-library-utils/health.svg)

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

PHPackages © 2026

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