PHPackages                             andrewhathaway/arraytopathnamedobject - 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. andrewhathaway/arraytopathnamedobject

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

andrewhathaway/arraytopathnamedobject
=====================================

Converts an array to a path-named object

v1.01(12y ago)125MITPHP

Since Nov 17Pushed 12y ago1 watchersCompare

[ Source](https://github.com/AndrewHathaway/ArrayToPathNamedObject)[ Packagist](https://packagist.org/packages/andrewhathaway/arraytopathnamedobject)[ Docs](http://github.com/andrewhathaway/ArrayToPathNamedObject)[ RSS](/packages/andrewhathaway-arraytopathnamedobject/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

ArrayToPathNamedObject
======================

[](#arraytopathnamedobject)

Converts arrays to objects, but concatenates paths with "\_" instead of having object-&gt;object. Terrible project to name. Written originally for a friend who didn't want `$obj->person->follower->photo`. An exception will be thrown if conflicting keys are the conflicting.

\###For example:

When we have `$data['person']['follower']['photo']` we can access it like `$obj->person_follower_photo`. You can also pass JSON string in and it will return the object.

\###Usage:

- Can be installed via Composer.

```
require('ArrayToPathNamedObject.php');

try {
	$obj = new ArrayToPathNamedObject($json);
} catch(Exception $e) {
	die($e);
}
```

[@andrewhathaway](http://twitter.com/andrewhathaway)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

4560d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cae8cb0989a0d51ce8e9183882bef519006d0782e5e1502fdecbf5e6cc8b699?d=identicon)[AndrewHathaway](/maintainers/AndrewHathaway)

---

Top Contributors

[![andrewhathaway](https://avatars.githubusercontent.com/u/1188830?v=4)](https://github.com/andrewhathaway "andrewhathaway (8 commits)")

---

Tags

arrayconvertpathobjectnamed

### Embed Badge

![Health badge](/badges/andrewhathaway-arraytopathnamedobject/health.svg)

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

###  Alternatives

[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k295.3M2.5k](/packages/symfony-property-access)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k9.2M108](/packages/cuyz-valinor)[yzen.dev/plain-to-class

Class-transformer to transform your dataset into a structured object

16293.9k6](/packages/yzendev-plain-to-class)[jasny/dotkey

Dot notation access for objects and arrays

14219.5k6](/packages/jasny-dotkey)[michaldudek/foundation

A set of useful PHP classes.

13111.9k13](/packages/michaldudek-foundation)[peridot-php/object-path

A string syntax to fetch values from array and object hierarchies

1053.6k1](/packages/peridot-php-object-path)

PHPackages © 2026

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