PHPackages                             thenexxuz/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. thenexxuz/utils

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

thenexxuz/utils
===============

A few common helpers for debugging. PID file lock out class and time measurement class.

1.3.0(5y ago)0151GPL-2.0-onlyPHP &gt;=7.1.0

Since Sep 5Pushed 5y agoCompare

[ Source](https://github.com/thenexxuz/utils)[ Packagist](https://packagist.org/packages/thenexxuz/utils)[ RSS](/packages/thenexxuz-utils/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (14)Used By (0)

TheNexxuz Utils
===============

[](#thenexxuz-utils)

[![Build Status](https://camo.githubusercontent.com/955badb9f55bacdc97b5463f80eb7e160e3c667e0c1f57a4b363e59964820436/68747470733a2f2f7472617669732d63692e636f6d2f7468656e657878757a2f7574696c732e737667)](https://travis-ci.com/thenexxuz/utils)[![PHP from Packagist](https://camo.githubusercontent.com/08304113a85d2e25930a12679174937ca4ce0f152b582549817e2a2cb17236ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7468656e657878757a2f7574696c73)](https://camo.githubusercontent.com/08304113a85d2e25930a12679174937ca4ce0f152b582549817e2a2cb17236ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7468656e657878757a2f7574696c73)[![Packagist Version](https://camo.githubusercontent.com/a9757c2b05c1816416abec4d0358564c91816d0c20eca31c540a5bc23c8bcee4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468656e657878757a2f7574696c73)](https://camo.githubusercontent.com/a9757c2b05c1816416abec4d0358564c91816d0c20eca31c540a5bc23c8bcee4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468656e657878757a2f7574696c73)[![Packagist](https://camo.githubusercontent.com/889a8b1064ad80ba5c1af0b72c04882c52b6745efc125a2c831b0e84c825573d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7468656e657878757a2f7574696c73)](https://camo.githubusercontent.com/889a8b1064ad80ba5c1af0b72c04882c52b6745efc125a2c831b0e84c825573d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7468656e657878757a2f7574696c73)

Helpers
-------

[](#helpers)

See the [helper readme](README-helpers.md)

Classes
-------

[](#classes)

### MeasureTime

[](#measuretime)

Use this class to measure response time when debugging or to include time in your API responses.

#### Usage

[](#usage)

```
$time = new MeasureTime();

/* Do some stuff */

echo $time->mark(); /* Total time since $time was instantiated */

/* Do more stuff */

echo $time->markInterval(); /* Time since last mark()  */

/* Do even more stuff */

echo $time->mark(); /* Total time since $time was instantiated */

```

### ProcessId

[](#processid)

Create a PID file and lock out running the script multiple times.

#### Installation

[](#installation)

`composer require thenexxuz/utils`

#### Usage

[](#usage-1)

Add `use TheNexxuz\Utils\ProcessId;` to your file.

Within your code add the following to the start of your script.

```
$pid = new ProcessId('myScriptName');
$pid->setLock();

```

or

```
$pid = new ProcessId();
$pid->setScriptName('myScriptName');
$pid->setLock();

```

If no name is given then `script` is used.

You can check if the process is running (boolean returned).

```
$pid->isRunning()

```

Add the following to the end of your script.

```
$pid->releaseLock();

```

#### Testing

[](#testing)

Run the tests with `vendor/bin/phpunit --coverage-html build/coverage-report`

#### Contributing

[](#contributing)

Please try to use GitFlow. [More information here.](https://nvie.com/posts/a-successful-git-branching-model/%5D) [And here.](https://support.gitkraken.com/git-workflows-and-extensions/git-flow/)

- Fork it!
- Create your feature branch: `git checkout -b feature/my-new-feature`
- Commit your changes: `git commit -am 'Add some feature'`
- Push to the branch: `git push origin feature/my-new-feature`
- Submit a pull request!

#### License

[](#license)

[GPL v2](LICENSE)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Recently: every ~103 days

Total

12

Last Release

2015d ago

### Community

Maintainers

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

---

Top Contributors

[![thenexxuz](https://avatars.githubusercontent.com/u/97260773?v=4)](https://github.com/thenexxuz "thenexxuz (45 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thenexxuz-utils/health.svg)

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

###  Alternatives

[cerbero/lazy-json

Framework-agnostic package to load JSONs of any dimension and from any source into Laravel lazy collections.

254309.8k1](/packages/cerbero-lazy-json)[ldaptools/ldaptools

LdapTools is a feature-rich LDAP library for PHP 5.6+.

204263.9k1](/packages/ldaptools-ldaptools)[ezsystems/ezplatform-standard-design

eZ Platform Standard Design Bundle

30705.9k10](/packages/ezsystems-ezplatform-standard-design)[symbiote/silverstripe-grouped-cms-menu

Allows you to group CMS menu items.

3696.2k6](/packages/symbiote-silverstripe-grouped-cms-menu)[phoenix-lib/nova-nested-tree-attach-many

Nova vue-tree-select field for management nested category relations.

3587.4k](/packages/phoenix-lib-nova-nested-tree-attach-many)[sajadsdi/laravel-setting-pro

Easy settings management for laravel framework

1315.9k](/packages/sajadsdi-laravel-setting-pro)

PHPackages © 2026

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