PHPackages                             growthops/ext-php - 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. growthops/ext-php

ActiveLibrary

growthops/ext-php
=================

This package includes various utility functions for php

v1.0.5(2y ago)012.3k↓100%1MITPHP

Since Aug 3Pushed 2y agoCompare

[ Source](https://github.com/growthops-digital/ext-php)[ Packagist](https://packagist.org/packages/growthops/ext-php)[ RSS](/packages/growthops-ext-php/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

**Ext-PHP**
===========

[](#ext-php)

This package includes various utility functions for php.
--------------------------------------------------------

[](#this-package-includes-various-utility-functions-for-php)

**Installation**
================

[](#installation)

`composer require growthops/ext-php`

**Functions**
=============

[](#functions)

Function: `isNull()`
--------------------

[](#function-isnull)

This function returns the value from the built-in php function `is_null()`

```
if (! function_exists('isNull')) {
    function isNull(mixed $value)
    {
        return is_null($value);
    }
}

```

Function: `notNull()`
---------------------

[](#function-notnull)

This function returns the inverse value from the built-in php function `is_null()`

```
if (! function_exists('notNull')) {
    function notNull(mixed $value)
    {
        return ! is_null($value);
    }
}

```

Function: `randomElements()`
----------------------------

[](#function-randomelements)

This function returns a randomised element from an array of elements. The function will use the predefined array if no array parameter is supplied.

```
if (! function_exists('randomElements')) {
    function randomElements(int $length, ?array $repository = null)
    {
        if (isNull($repository)) {
            $repository = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'M', 'N', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', '8', '9'];
        }

        $randomElements = [];
        $max = count($repository) - 1;

        for ($x = 0; $x < $length; $x++) {
            $randomElements[] = $repository[random_int(0, $max)];
        }

        return $randomElements;
    }
}

```

**Traits**
==========

[](#traits)

Trait: `Composable`
-------------------

[](#trait-composable)

This trait allows the model to be instantiated if it does not exist. It also allows the model to be saved and returned in a single method.

```
public static function compose(?self $model = null): self
{
    if (notNull($model)) {
        return $model;
    }

    return new self();
}

```

```
public function commit(): self
{
    $this->save();

    return $this;
}

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Recently: every ~82 days

Total

6

Last Release

1047d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de888303a7e44d7cf1bed8ff378ddb4558017d208f753f072ccc593082d313a0?d=identicon)[bne-digital](/maintainers/bne-digital)

---

Top Contributors

[![daniels-go](https://avatars.githubusercontent.com/u/100657987?v=4)](https://github.com/daniels-go "daniels-go (10 commits)")

### Embed Badge

![Health badge](/badges/growthops-ext-php/health.svg)

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

PHPackages © 2026

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