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

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

wkhayrattee/php-utils
=====================

A list of reusable functions to use across PHP projects, with Test cases

11.3kPHP

Since Dec 1Pushed 3y ago1 watchersCompare

[ Source](https://github.com/wkhayrattee/php-utils)[ Packagist](https://packagist.org/packages/wkhayrattee/php-utils)[ RSS](/packages/wkhayrattee-php-utils/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-utils
=========

[](#php-utils)

A list of reusable functions to use across PHP projects, with Test cases

Testing With PEST
-----------------

[](#testing-with-pest)

### Installing PEST

[](#installing-pest)

```
$ composer require pestphp/pest --dev --with-all-dependencies

$ vendor/bin/pest --init
```

The `init` command will create the following files &amp; folders as mentioned in the output:

```
   DONE  Created `tests` directory.
   DONE  Created `phpunit.xml` file.
   DONE  Created `tests/Pest.php` file.
   DONE  Created `tests/ExampleTest.php` file.

   DONE  Pest initialised.
```

### Test Code Coverage aka PCOV

[](#test-code-coverage-aka-pcov)

- We'll use [PCOV](https://github.com/krakjoe/pcov)

#### Installing PCOV

[](#installing-pcov)

- Installation as per [guide here](https://github.com/krakjoe/pcov/blob/develop/INSTALL.md):

```
$ git clone https://github.com/krakjoe/pcov.git
$ cd pcov
$ phpize
$ ./configure --enable-pcov
$ make
$ make test
$ make install
```

#### Enabling PCOV

[](#enabling-pcov)

1. Note the `/path/to/the/pcov.so` on your CLI just after the executing the `make install` command
2. Add the below on your CLI's php.ini (since we are using cli and not web)

```
[pcov]
extension=/usr/lib/php/20210902/pcov.so
pcov.enabled = 1
```

For list of values to customise in `php.ini`, see [this doc here](https://github.com/krakjoe/pcov/blob/develop/README.md#configuration)

### Executing the Test Coverage:

[](#executing-the-test-coverage)

```
$ vendor/bin/pest --coverage

```

#### With report format

[](#with-report-format)

```
$ vendor/bin/pest --coverage --testdox

```

References &amp; Recommended Resources
--------------------------------------

[](#references--recommended-resources)

-
-

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e099126f576980e8508ea28e129bc361755285226ed201053528546aec356aa?d=identicon)[wkhayrattee](/maintainers/wkhayrattee)

---

Top Contributors

[![wkhayrattee](https://avatars.githubusercontent.com/u/7369626?v=4)](https://github.com/wkhayrattee "wkhayrattee (13 commits)")

---

Tags

phpphp-library

### Embed Badge

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

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

PHPackages © 2026

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