# PHP Dot Array documentation (v8.6.x)

> Canonical: https://pharaonic.dev/packages/php/dot-array/8.6.x  
> Version: v8.6.x (latest release 8.6.0, 2026-12-01)  
> Install: composer require pharaonic/php-dot-array  
> Requires: PHP 8.6  
> Repository: https://github.com/Pharaonic/php-dot-array  
> All versions: https://pharaonic.dev/packages/php/dot-array/8.6.x.md https://pharaonic.dev/packages/php/dot-array/8.5.x.md https://pharaonic.dev/packages/php/dot-array/8.4.x.md https://pharaonic.dev/packages/php/dot-array/8.3.x.md https://pharaonic.dev/packages/php/dot-array/8.2.x.md https://pharaonic.dev/packages/php/dot-array/8.1.x.md https://pharaonic.dev/packages/php/dot-array/8.0.x.md

:::badges
- PHP Package {color=blue}
- v8.6.0 {color=green}
- MIT License {color=purple}
:::

# PHP Dot Array

Read, write, check and delete values in deeply nested PHP arrays using dot-notation paths (`user.profile.name`) and `*` wildcards (`users.*.email`). It is small and framework-independent. One path parser and one set of wildcard rules are shared by every operation, so `get()`, `set()`, `has()` and `delete()` always agree on what a path means.

:::features
### Dot-Notation Paths
Read user.profile.name or write a.b.c in one call; missing keys are created on write.

### Wildcards
users.*.email reaches the value in every element, nested wildcards included.

### Safe Defaults
Defaults cover missing and null values, while has() still sees a key set to null.

### Escaping
A backslash escapes a dot or a star, so keys like app.name and * stay reachable.

### Reference Mode
setReference() writes every change straight to your own array.

### ArrayAccess & Countable
Array syntax, isset(), unset(), count(), foreach and json_encode() all work.
:::

:::info Quick Tip
Wrap any array with the `dot()` helper and chain your writes: `dot($data)->set('user.active', true)->delete('user.password')`.
:::

## Installation

Install the package with Composer. There is nothing to register or configure.

### Requirements

- PHP 8.6.x (each `8.x` release line targets the matching PHP version)
- `ext-mbstring`
- `pharaonic/php-readable` ~8.6.0 (installed automatically)

### Composer Installation

```bash title="Terminal" no-line-numbers
composer require pharaonic/php-dot-array
```

Composer autoloads the `Pharaonic\DotArray` namespace and the global `dot()` helper.

:::success Installation Complete
You're all set! Try `dot(['user' => ['name' => 'Raggi']])->get('user.name')`, which returns `"Raggi"`.
:::

## Basic Usage

Wrap an array with the `dot()` helper, or create a `DotArray` yourself. Both accept an array, another `DotArray`, or nothing for an empty one:

```php
use Pharaonic\DotArray\DotArray;

$dot = dot(['user' => ['name' => 'Raggi']]);
$dot = new DotArray(['user' => ['name' => 'Raggi']]);
```

The instance works on its own copy of the array. To change your array directly, see [Reference Mode](#reference-mode).

### Reading Values

`get()` follows the path one key at a time. Numeric indexes are keys like any other:

```php
$dot = dot([
    'user'   => ['profile' => ['name' => 'Raggi']],
    'matrix' => [[1, 2], [3, 4]],
]);

$dot->get('user.profile.name');   // "Raggi"
$dot->get('user.profile');        // ["name" => "Raggi"]
$dot->get('matrix.1.0');          // 3
$dot->all();                      // the whole array

dot(['first', 'second'])->get(1); // "second" (integer keys work too)
```

### Default Values

The second argument of `get()` is returned when the path is missing or its value is `null`. A path is missing when a key doesn't exist, or when a value on the way isn't an array:

```php
$dot = dot(['user' => ['email' => null, 'name' => 'Raggi', 'active' => false]]);

$dot->get('user.phone');            // null   (missing, no default given)
$dot->get('user.phone', 'n/a');     // "n/a"  (missing)
$dot->get('user.name.first', 'x');  // "x"    ("Raggi" is not an array)
$dot->get('user.email', 'n/a');     // "n/a"  (null)
```

Other empty values, `false`, `0`, `''` and `[]`, are returned as they are:

```php
$dot->get('user.active', true);     // false
```

To tell a `null` value from a missing key, use `has()`.

:::info Wildcards and defaults
With a `*` in the path, the default works per element. See [Wildcards](#wildcards).
:::

### Writing Values

`set()` creates missing keys and returns the instance, so calls can be chained:

```php
$dot = dot();

$dot->set('user.name', 'Raggi')
    ->set('user.roles.0', 'admin');

$dot->all();   // ["user" => ["name" => "Raggi", "roles" => ["admin"]]]
```

A value that isn't an array and sits in the way of the path is replaced by an array:

```php
$dot = dot(['a' => 'hello']);
$dot->set('a.b', 1);

$dot->all();   // ["a" => ["b" => 1]]
```

### Checking Paths

`has()` is `true` when the path exists, even when its value is `null`:

```php
$dot = dot(['user' => ['email' => null]]);

$dot->has('user.email');   // true
$dot->has('user.phone');   // false
```

### Deleting Values

`delete()` returns `true` when something was deleted. `pull()` returns the value (or the default) and deletes it:

```php
$dot = dot(['token' => 'abc', 'user' => ['name' => 'Raggi', 'password' => 'secret']]);

$dot->delete('user.password');   // true
$dot->delete('user.password');   // false (already gone)

$dot->pull('token');             // "abc"
$dot->pull('token', 'none');     // "none"

$dot->all();                     // ["user" => ["name" => "Raggi"]]
```

### Clearing and Counting

```php
$dot = dot(['a' => [1, 2, 3], 'b' => 'x']);

$dot->count();       // 2 (top-level items)
$dot->count('a');    // 3
$dot->count('b');    // 0 (not an array)
$dot->isEmpty('a');  // false

$dot->clear();
$dot->isEmpty();     // true
```

An empty path never deletes anything; use `clear()` to empty the whole array.

## Wildcards

A `*` segment matches every element of the array it is applied to. Every operation supports it:

```php
$dot = dot([
    'users' => [
        ['name' => 'Ahmed', 'profile' => ['email' => 'ahmed@example.com']],
        ['name' => 'Sara', 'profile' => []],
    ],
]);

$dot->get('users.*.name');                // ["Ahmed", "Sara"]
$dot->get('users.*.profile.email');       // ["ahmed@example.com", null]
$dot->get('users.*.profile.email', '-');  // ["ahmed@example.com", "-"]

$dot->has('users.*.name');                // true:  every user has a name
$dot->has('users.*.profile.email');       // false: Sara has no email

$dot->set('users.*.active', true);        // adds "active" => true to every user
$dot->delete('users.*.profile');          // removes "profile" from every user
$dot->count('users.*.name');              // 2
```

### Nested Wildcards

Nested wildcards give one flat list, in order:

```php
$dot = dot([
    'groups' => [
        ['users' => [['name' => 'A'], ['name' => 'B']]],
        ['users' => [['name' => 'C']]],
    ],
]);

$dot->get('groups.*.users.*.name');   // ["A", "B", "C"]

$dot->set('groups.*.users.*.active', true);
$dot->get('groups.*.users.*.active'); // [true, true, true]
```

### How Matching Works

The rules are the same for `get()`, `has()`, `set()`, `delete()` and `pull()`:

1. The elements reached by the **last** `*` are matched. For each of them, the rest of the path is read, written or deleted as usual.
2. Branches that don't reach the last `*` are skipped: a missing key, or a value that isn't an array, before it. When keys follow the last `*`, elements that aren't arrays are skipped too.
3. A trailing `*` means the elements themselves.
4. `*` is a wildcard only as a whole segment: `a.b*` is the literal key `b*`.

```php
$dot = dot([
    'groups' => [
        ['users' => [['name' => 'A']]],
        ['title' => 'no users'],          // skipped: no "users" key
        ['users' => [['name' => 'B'], 'x']], // "x" skipped: not an array
    ],
]);

$dot->get('groups.*.users.*.name');   // ["A", "B"]
$dot->has('groups.*.users.*.name');   // true
```

### Results and Defaults

| Operation | Result with a wildcard |
| --- | --- |
| `get($path, $default)` | A list with one entry per matched element: its value, or `$default` where the rest of the path is missing or `null`. `$default` itself when nothing matches. Keys of associative arrays are not kept. |
| `has($path)` | `true` when at least one element matches and every matched element has the rest of the path. |
| `set($path, $value)` | Sets the value in every matched element. Never creates elements for a `*`. |
| `delete($path)` | Deletes the key from every matched element; `true` when at least one was deleted. |
| `pull($path, $default)` | Returns what `get()` returns, then deletes like `delete()`. |
| `count($path)` | The number of entries `get()` returns, or `0`. |

```php
$dot = dot(['users' => [], 'roles' => ['admin' => ['level' => 1], 'editor' => ['level' => 2]]]);

$dot->get('users.*.name', 'none');   // "none" (nothing matched)
$dot->get('roles.*.level');          // [1, 2]
$dot->get('roles.*');                // [["level" => 1], ["level" => 2]]

$dot->set('users.*.active', true);   // nothing to update, nothing created
$dot->get('users');                  // []
```

### Trailing Wildcards

A trailing `*` reaches the elements themselves:

```php
$dot = dot(['flags' => ['beta' => true, 'dark' => true], 'tags' => ['a', 'b']]);

$dot->set('flags.*', false);   // every flag becomes false
$dot->delete('tags.*');        // "tags" becomes []
$dot->all();                   // ["flags" => ["beta" => false, "dark" => false], "tags" => []]
```

:::warning The array itself
`delete('tags.*')` empties `tags` but keeps the key. To remove the key, use `delete('tags')`.
:::

## Paths & Escaping

A path is a list of keys separated by `.`. The same parser is used by every method.

### Escaping Dots

Use `\.` for a dot that is part of a key:

```php
$dot = dot(['config' => ['app.name' => 'Pharaonic']]);

$dot->get('config.app\.name');   // "Pharaonic"
$dot->get('config.app.name');    // null (looks for ["app"]["name"])

$dot->set('hosts.example\.com.port', 443);
$dot->get('hosts');              // ["example.com" => ["port" => 443]]
```

### Escaping Wildcards

Use `\*` for a key that is literally `*`:

```php
$dot = dot(['items' => ['*' => ['name' => 'Literal Star'], 'x' => ['name' => 'X']]]);

$dot->get('items.\*.name');   // "Literal Star"
$dot->get('items.*.name');    // ["Literal Star", "X"]
```

### Backslashes

`\\` is a literal backslash. Any other backslash is kept as it is, so class names work as keys:

```php
$dot = dot(['App\Models\User' => ['table' => 'users']]);

$dot->get('App\Models\User.table');   // "users"
```

:::info PHP strings
In single-quoted PHP strings, `'\.'` and `'\*'` are already a backslash followed by the character, so you can write the paths exactly as shown. In double-quoted strings, write `"config.app\\.name"`.
:::

### Numeric Keys

Numeric segments reach numeric keys. PHP itself stores `'1'` as the integer key `1`, so both spellings reach the same element, while `'01'` stays a string key:

```php
$dot = dot([0 => 'A', '1' => 'B', '01' => 'C']);

$dot->get('1');    // "B"
$dot->get(1);      // "B"
$dot->get('01');   // "C"
$dot->get('0');    // "A"
```

### Unusual Paths

| Path | Meaning |
| --- | --- |
| `''`, `'.'` | The whole array: `get()` returns it, `has()` is `true`, `set()` and `delete()` do nothing. |
| `'.user.'`, `' user '` | Leading and trailing dots and spaces are ignored: `user`. |
| `'user..name'` | An empty-string key between `user` and `name`. |
| `'a\.'` | The key `a.` (an escaped trailing dot is kept). |

## ArrayAccess & Interfaces

`DotArray` implements `ArrayAccess`, `Countable`, `IteratorAggregate` and `JsonSerializable`.

### ArrayAccess

Array syntax maps directly to the methods, paths and wildcards included:

| Syntax | Same as |
| --- | --- |
| `$dot['user.name']` | `$dot->get('user.name')` |
| `$dot['user.name'] = 'Raggi'` | `$dot->set('user.name', 'Raggi')` |
| `$dot[] = 'value'` | Appends to the root array. |
| `isset($dot['user.name'])` | `$dot->has('user.name')` |
| `unset($dot['user.name'])` | `$dot->delete('user.name')` |

```php
$dot = dot();

$dot['user.name'] = 'Raggi';
$dot['user.email'] = null;
$dot[] = 'appended';

$dot['user.name'];            // "Raggi"
isset($dot['user.email']);    // true (null still exists)
$dot['users.*.name'];         // null (no users yet)

unset($dot['user.name']);
```

:::info isset() and null
Unlike a plain array, `isset($dot['user.email'])` is `true` when the value is `null`, because it uses `has()`.
:::

### Countable

`count($dot)` counts the top-level items. `$dot->count($path)` counts the items at a path, and is `0` when the path is missing or not an array:

```php
$dot = dot(['users' => [['name' => 'A'], ['name' => 'B']], 'title' => 'x']);

count($dot);                   // 2
$dot->count('users');          // 2
$dot->count('users.*.name');   // 2
$dot->count('title');          // 0
```

### Iteration

`foreach` walks the top-level items:

```php
foreach (dot(['a' => 1, 'b' => 2]) as $key => $value) {
    echo "$key=$value ";   // a=1 b=2
}
```

### JSON

`toJson()` encodes the whole array, or the value at a path, with optional `json_encode()` flags. `json_encode($dot)` gives the same result as `toJson()`:

```php
$dot = dot(['user' => ['name' => 'Raggi', 'url' => 'https://pharaonic.dev']]);

$dot->toJson();                                 // the whole array
$dot->toJson('user.name');                      // '"Raggi"'
$dot->toJson('user', JSON_UNESCAPED_SLASHES);   // '{"name":"Raggi","url":"https://pharaonic.dev"}'
json_encode($dot);                              // same as toJson()
```

When encoding fails, `toJson()` returns an empty string. Pass `JSON_THROW_ON_ERROR` to get a `JsonException` instead.

## Reference Mode

By default, a `DotArray` works on its own copy, so your array is never changed:

```php
$array = ['user' => ['name' => 'Old']];

$dot = dot($array);
$dot->set('user.name', 'New');

$array['user']['name'];   // "Old"
```

`setReference()` binds the instance to your array instead, so every write lands there:

```php
use Pharaonic\DotArray\DotArray;

$array = ['user' => ['name' => 'Old']];

$dot = (new DotArray())->setReference($array);
$dot->set('user.name', 'New');

$array['user']['name'];   // "New"
```

`set()`, `delete()`, `pull()`, `clear()`, `setArray()` and ArrayAccess writes, wildcards included, all write to the referenced array. Changes you make to the array yourself are visible through the instance too. Reads never modify it.

```php
$config = ['users' => [['name' => 'A', 'password' => 'x']]];

(new DotArray())->setReference($config)
    ->set('users.*.active', true)
    ->delete('users.*.password');

$config;   // ["users" => [["name" => "A", "active" => true]]]
```

:::warning setArray() and clear()
After `setReference()`, `setArray($items)` replaces the contents of your array and `clear()` empties it. To stop working on your array, create a new instance.
:::

## Extending

`DotArray` is not final, and subclassing it is supported. A subclass can override any public method and use the protected `$_ITEMS` array, which holds the items (or the referenced array in [Reference Mode](#reference-mode)).

```php
use Pharaonic\DotArray\DotArray;

class Settings extends DotArray
{
    public function get(string|int $key, mixed $default = null, ?array $arr = null)
    {
        return parent::get('settings.' . $key, $default, $arr);
    }

    public function set(string $key, mixed $value = null, ?array &$arr = null)
    {
        return parent::set('settings.' . $key, $value, $arr);
    }

    public function keys(): array
    {
        return array_keys($this->_ITEMS['settings'] ?? []);
    }
}

$settings = new Settings(['settings' => ['theme' => 'dark']]);

$settings->get('theme');            // "dark"
$settings->set('locale', 'ar');
$settings->keys();                  // ["theme", "locale"]
$settings['locale'];                // "ar" (ArrayAccess uses your get() and set())
```

### What Stays Stable

On every release line:

- Public methods keep their names, parameters and declared return types. Methods without a native return type (`get()`, `set()`, `has()`, `all()`, `clear()`, `setArray()`, `setReference()`) don't gain one, so overrides without a return type keep working.
- `$_ITEMS` stays an untyped `protected` property.
- ArrayAccess calls `get()`, `set()`, `has()` and `delete()`, and `pull()` calls `get()` and `delete()`, so overriding those four methods changes array syntax and `pull()` too.

:::warning Override related methods together
`pull()` reads with your `get()` but deletes with `delete()`. If you change how `get()` maps a path, override `delete()` and `has()` the same way.
:::

## API Reference

### `Pharaonic\DotArray\DotArray`

| Method | Description | Returns |
| --- | --- | --- |
| `__construct(mixed $items = [])` | Create an instance from an array, another `DotArray`, or any value castable to an array. | |
| `get(string\|int $key, mixed $default = null)` | The value at a path, or `$default` when it doesn't exist. A list with a wildcard. | `mixed` |
| `set(string $key, mixed $value = null)` | Set a value, creating missing keys. | `$this` |
| `has(string\|int $key)` | Whether the path exists, even when its value is `null`. | `bool` |
| `delete(string\|int $key)` | Delete a path. | `bool` (`true` when something was deleted) |
| `pull(string\|int $key, mixed $default = null)` | Return the value like `get()`, then delete it. | `mixed` |
| `all()` | The whole array. | `array` |
| `clear()` | Empty the array. | `$this` |
| `setArray(mixed $items)` | Replace the array. | `$this` |
| `setReference(array &$items)` | Work on the given array by reference. | `$this` |
| `count(string\|int\|null $key = null)` | The number of top-level items, or of items at a path (`0` when missing or not an array). | `int` |
| `isEmpty(?string $key = null)` | Whether the array, or the value at a path, is empty. | `bool` |
| `toJson(int\|string\|null $key = null, int $options = 0)` | The array, or the value at a path, as JSON (`''` on failure). | `string` |
| `getIterator()` | Iterator over the top-level items. | `ArrayIterator` |
| `jsonSerialize()` | The array, for `json_encode()`. | `array` |
| `offsetGet()` / `offsetSet()` / `offsetExists()` / `offsetUnset()` | `ArrayAccess`: see [ArrayAccess & Interfaces](#array-access). | |

To subclass `DotArray`, see [Extending](#extending).

### Helper

| Function | Description | Returns |
| --- | --- | --- |
| `dot(mixed $items = [])` | Same as `new DotArray($items)`. | `DotArray` |

### Deprecated

These still work, without runtime warnings, and are kept on every existing release line:

| Name | Use instead |
| --- | --- |
| `isNumericKeys()`, `array_is_numeric(array $arr)` | `Pharaonic\Readable\Arr::isList($array)` |
| `isMultidimensional()`, `array_is_multidimensional(array $arr)` | `Pharaonic\Readable\Arr::isMultidimensional($array)` |
| `isNulledValues()`, `array_is_null(array $arr)` | `Pharaonic\Readable\Arr::isNull($array)` |
| The third argument of `get()`, `has()`, `set()` and `delete()` (an array to work on) | `dot($array)` or `setReference($array)` |

## Examples

### 1. Reading an API Response

Pull what you need from a deeply nested JSON response without `isset()` chains:

```php title="app/Services/OrderImporter.php"
$response = dot(json_decode($json, true));

$orderId  = $response->get('data.order.id');
$currency = $response->get('data.order.currency', 'USD');
$skus     = $response->get('data.order.items.*.sku', []);
$total    = array_sum($response->get('data.order.items.*.price', []));
```

The `[]` default keeps `array_sum()` safe when the order has no items.

### 2. Cleaning Data Before Output

Remove sensitive fields from every record, then encode the result:

```php title="app/Http/Controllers/UserController.php"
$payload = dot(['users' => $users])
    ->set('users.*.profile.public', true);

$payload->delete('users.*.password');
$payload->delete('users.*.remember_token');

return $payload->toJson('users', JSON_UNESCAPED_UNICODE);
```

### 3. Editing a Config Array in Place

Use reference mode to update a configuration array that the rest of the code already holds:

- ===Bootstrap

  ```php title="bootstrap/config.php"
  use Pharaonic\DotArray\DotArray;

  $config = require __DIR__ . '/../config/app.php';

  $settings = (new DotArray())->setReference($config);
  $settings->set('cache.driver', getenv('CACHE_DRIVER') ?: 'file');
  $settings->set('mail.hosts.smtp\.example\.com.port', 587);
  ```

- ===Config

  ```php title="config/app.php"
  return [
      'cache' => ['driver' => 'array'],
      'mail'  => ['hosts' => []],
  ];
  ```

After this, `$config['cache']['driver']` holds the new driver, and the SMTP host is stored under the key `smtp.example.com`.

### 4. Validating Nested Input

Check that every line of a submitted form has the fields you need:

```php title="app/Forms/InvoiceForm.php"
$input = dot($_POST);

if (! $input->has('lines.*.product_id') || ! $input->has('lines.*.quantity')) {
    throw new InvalidArgumentException('Every line needs a product and a quantity.');
}

$input->set('lines.*.tax_rate', 0.14);
```

`has()` with a wildcard is `false` when there are no lines at all, and when any line misses the field.

### 5. Array Syntax in Templates

Pass a `DotArray` to code that expects array access:

```php
$view = dot(['page' => ['title' => 'Home', 'meta' => ['og.title' => 'Welcome']]]);

echo $view['page.title'];             // Home
echo $view['page.meta.og\.title'];    // Welcome
echo isset($view['page.subtitle']) ? 'yes' : 'no';   // no
```

## Troubleshooting

### `get()` returns my default although the key exists

The key holds `null`, and `get()` gives the default for `null` values as well as for missing paths. Use `has()` to check whether the key exists:

```php
$dot = dot(['a' => null]);

$dot->get('a', 'x');   // "x"
$dot->has('a');        // true
```

### `get()` returns `[]` or `false` instead of my default

The key exists with that value. Only missing paths and `null` values give the default. Use `?:` for a fallback on any empty value:

```php
dot(['a' => []])->get('a') ?: 'x';   // "x"
```

### A key with a dot in its name can't be found

`config.app.name` looks for `["config"]["app"]["name"]`. Escape the dot: `config.app\.name`. In a double-quoted PHP string, write `"config.app\\.name"`.

### A wildcard read returns the default instead of a list

Nothing matched: the array before the `*` is missing, empty, or not an array, or no element reached the last `*`. Pass `[]` as the default when you want an empty list:

```php
dot(['users' => []])->get('users.*.name', []);   // []
```

### A wildcard read has fewer entries than the array has elements

When keys follow the last `*`, elements that aren't arrays are skipped. Branches that miss a key before the last `*` are skipped too. Elements that are arrays but miss the rest of the path are kept, with the default as their value (the same as a `null` value).

### `set()` with a wildcard didn't add anything

Wildcards only update existing elements; they never create them. Write to an index instead: `set('users.0.active', true)`.

### `has()` with a wildcard is `false` although some elements have the key

With a `*`, `has()` is `true` only when every matched element has the path. Check the values instead when one is enough:

```php
$emails = dot($data)->get('users.*.email', []);
$anyEmail = array_filter($emails, fn ($email) => $email !== null) !== [];
```

### `delete('users.*')` didn't remove the `users` key

A trailing `*` means the elements, so `users` becomes `[]`. Use `delete('users')` to remove the key.

### My original array didn't change

A `DotArray` works on its own copy. Use [Reference Mode](#reference-mode) to write to your array.

### `toJson()` returns an empty string

Encoding failed, usually because of invalid UTF-8. Pass `JSON_THROW_ON_ERROR` to see why:

```php
$dot->toJson(null, JSON_THROW_ON_ERROR);   // throws JsonException with the reason
```

## Upgrade Guide

Patch releases within the `8.6.x` line need no migration steps: they keep every result and signature. Each release is listed in the [changelog](https://github.com/Pharaonic/php-dot-array/blob/8.6.x/CHANGELOG.md).

Each PHP version has its own release line (`8.0.x`, `8.1.x`, …) with the same API. Composer picks the line that matches your PHP version, so upgrading PHP needs no code changes.

### From 2.x to 8.0

Version 8.0.0 rebuilt the path engine. Every method and helper from 2.x still exists with the same parameters, and `delete()` still returns `bool`, but some results changed. Most of them were bugs.

The full list, with before and after values for every change, is in [UPGRADE.md](https://github.com/Pharaonic/php-dot-array/blob/8.6.x/UPGRADE.md).

#### What Changed

| Change | Before | Now |
| --- | --- | --- |
| Existing `[]`, `[null, null]` | `get('a', 'x')` gave `'x'` | gives the value (`null` still gives `'x'`) |
| Existing `null` | `has()`/`delete()` ignored it | `has()` is `true`, `delete()` removes it |
| Wildcard values that are arrays | merged: `get('users.*.p')` gave `["e" => [1, 2]]` | one entry per element: `[["e" => 1], ["e" => 2]]` |
| Trailing `*` | stripped: `delete('users.*')` deleted `users` | the elements: `users` becomes `[]` |
| `set()` with a `*` on a missing or empty array | created `[["active" => true]]` | does nothing |
| `has()` with a `*` and no matches | `true` for an empty array | `false` |
| `delete()` with a `*` | `false` unless every element had the key | `true` when anything was deleted |
| Path `'0'` | treated as an empty path | the key `0` |
| `set('a.b', 1)` on `["a" => "hello"]`, `count('missing')`, wildcards over scalars | threw `TypeError` / `Error` | work (see [Basic Usage](#basic-usage) and [Wildcards](#wildcards)) |
| `\.`, `\*`, `\\` in a path | literal backslashes | escapes (see [Paths & Escaping](#paths)) |
| `isNumericKeys()` on `[]`, `isMultidimensional()` on `['a' => []]` | `false` | `true` (now backed by `Pharaonic\Readable\Arr`) |

#### New

- `pull($path, $default)` returns a value and deletes it.
- `set()`, `clear()`, `setArray()` and `setReference()` return the instance, so calls can be chained.

#### Deprecated

`isNumericKeys()`, `isMultidimensional()`, `isNulledValues()` and the `array_is_*()` helpers (use `Pharaonic\Readable\Arr` instead), and the third argument of `get()`, `has()`, `set()` and `delete()`. See the [API Reference](#api-reference) for replacements. They keep working on every existing release line.
