PHPackages                             travis/ex - 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. travis/ex

ActiveLibrary

travis/ex
=========

A PHP function to safely extract information from a multi-dimensional object or array.

v1.0.1(4y ago)26.7k12MITPHPPHP &gt;=5.3.0

Since Feb 14Pushed 4y ago2 watchersCompare

[ Source](https://github.com/swt83/php-ex)[ Packagist](https://packagist.org/packages/travis/ex)[ Docs](https://github.com/swt83/php-ex)[ RSS](/packages/travis-ex/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (2)

Extraction
==========

[](#extraction)

A PHP function to safely extract information from a multi-dimensional object or array.

Install
-------

[](#install)

Normall install via Composer.

Usage
-----

[](#usage)

```
$array = array(
    'foo' => array(
        'bar' => array(
            'foo' => array(
                'bar' => 'asdf'
            )
        )
    )
);

$value = ex($array, 'foo.bar.foo.bar'); // returns "asdf"
$value = ex($array, 'foo.bar.foo.invalid_key'); // returns null
$value = ex($array, 'foo.bar.foo.invalid_key', 'default'); // returns "default"
```

Updates
-------

[](#updates)

I added another helper function to safely count arrays:

```
$array = null;
$count = excount($array); // returns 0 instead of error
```

I wanted this to fix a change in PHP 7.4 which breaks `sizeof()`.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

1595d ago

### Community

Maintainers

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

---

Top Contributors

[![swt83](https://avatars.githubusercontent.com/u/907900?v=4)](https://github.com/swt83 "swt83 (9 commits)")

### Embed Badge

![Health badge](/badges/travis-ex/health.svg)

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

PHPackages © 2026

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