PHPackages                             enzyme/freckle - 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. enzyme/freckle

ActiveLibrary

enzyme/freckle
==============

A collection of dot-based information retrieval helpers... wuh?

v0.3.0(10y ago)12121MITPHPPHP &gt;=5.5.0

Since Apr 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/enzyme/freckle)[ Packagist](https://packagist.org/packages/enzyme/freckle)[ Docs](https://github.com/enzyme/freckle)[ RSS](/packages/enzyme-freckle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (5)Used By (1)

[![](https://cloud.githubusercontent.com/assets/2805249/14230969/0916d2f6-f9b3-11e5-8e30-864a599f2e2d.png)](https://cloud.githubusercontent.com/assets/2805249/14230969/0916d2f6-f9b3-11e5-8e30-864a599f2e2d.png)

[![Build Status](https://camo.githubusercontent.com/c8efb7c0516b1fa03ffde92275eb341dd77c2c8626b0e9ef788036aa03ccc136/68747470733a2f2f7472617669732d63692e6f72672f656e7a796d652f667265636b6c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/enzyme/freckle)[![Coverage Status](https://camo.githubusercontent.com/4167e13e0c5dfc22b4218aa76a73196721c954e46ab7a85e0946c090a9c6bbd7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f656e7a796d652f667265636b6c652f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/enzyme/freckle?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e90ac5943b4c555be0a384fb3e0699556179f88d4931d1821c3bab3b883f1ff7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656e7a796d652f667265636b6c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/enzyme/freckle/?branch=master)

Freckle is a collection of information accessors. It allows you to traverse and get the values in arrays and other collection types using dot separated paths. For example, getting the value in a multi-dimensional-associative array for `users.bob456.name`, given the array:

```
$array = [
    'users' => [
        'jane123' => ['name' => 'Jane Foo'],
        'bob456'  => ['name' => 'Bob Foo'],
    ]
];
```

would return the value of `Bob Foo`. Pretty straight forward hey?

Installation
============

[](#installation)

```
composer require enzyme/freckle
```

Usage
=====

[](#usage)

Getting a value from a simple collection.

```
use Enzyme\Freckle\Dot;

$array = [
    'users' => [
        'jane123' => ['name' => 'Jane Foo'],
        'bob456'  => ['name' => 'Bob Foo'],
    ]
];

$dot = new Dot;
$full_name = $dot->get($array, 'users.bob456.name'); // returns "Bob Foo".
```

Getting a value from a simple collection with numeric keys.

```
use Enzyme\Freckle\Dot;

$array = [
    'users' => [
        0 => [
            'jane123' => ['name' => 'Jane Foo'],
        ],
        1 => [
            'bob456'  => ['name' => 'Bob Foo'],
        ]
    ]
];

$dot = new Dot;
$full_name = $dot->get($array, 'users.bob456.name'); // returns "Bob Foo".
```

In the event that a collection has numeric keys or supports multiple entries with the same key name, only the first result found will ever be returned.

If no value can be found, `null` will be returned instead. **Be careful though** if you're checking against the null value for success as you may get false positives if an actual value was found, but that value happens to be `null`.

Contributing
============

[](#contributing)

Please see `CONTRIBUTING.md`

License
=======

[](#license)

MIT - Copyright (c) 2015 Tristan Strathearn, see `LICENSE`

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

Total

3

Last Release

3690d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/148afe40f056b8f57e43ed0505c6040f762e26805b1d1bebed87484d529bae07?d=identicon)[r3oath](/maintainers/r3oath)

---

Top Contributors

[![r3oath](https://avatars.githubusercontent.com/u/2805249?v=4)](https://github.com/r3oath "r3oath (15 commits)")

---

Tags

dotpathcollectionsinformationenzymefreckleretrieval

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/enzyme-freckle/health.svg)

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

###  Alternatives

[doctrine/collections

PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.

6.0k411.1M1.2k](/packages/doctrine-collections)[dflydev/dot-access-data

Given a deep data structure, access data by dot notation.

718359.1M86](/packages/dflydev-dot-access-data)[league/config

Define configuration arrays with strict schemas and access values with dot notation

564302.2M24](/packages/league-config)[league/uri-components

URI components manipulation library

31932.3M67](/packages/league-uri-components)[curl/curl

cURL class for PHP

32814.9M195](/packages/curl-curl)[matthiasmullie/path-converter

Relative path converter

10229.6M7](/packages/matthiasmullie-path-converter)

PHPackages © 2026

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