You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ArrayKit is a modern PHP 8.4+ library for elegant, high-performance array manipulation, dot notation
utilities, dynamic configuration, hookable collections, and more.
From shallow single arrays to deeply nested data structures — ArrayKit provides a fluent, reliable toolkit for
real-world PHP projects.
Lightweight array-shape assertions for row validation (require).
BaseArrayHelper
Internal shared base for consistent API across helpers.
ArraySharedOps
Internal shared operations used by ArraySingle and ArrayMulti (each/every/partition/skip*).
Config System
Class
Description
Config
Dot-access configuration loader with explicit hook-aware variants (getWithHooks, setWithHooks, fillWithHooks) plus compiled cache export/load and read memoization.
LazyFileConfig
First-segment lazy loader (db.host loads db.php on demand) with namespace cache files for structural reads and a flat leaf-index cache for exact scalar lookups.
Optional global helper variants (manual include when needed).
➤ Facade
Class
Description
ArrayKit
Single entry point for arrays, dot tools, config, and collections (single(), multi(), etc.).
Requirements
PHP 8.4 or higher
Installation
composer require infocyph/arraykit
<?php// Namespaced helpers are autoloaded by default.usefunctionInfocyph\ArrayKit\array_get;
usefunctionInfocyph\ArrayKit\array_set;
usefunctionInfocyph\ArrayKit\collect;
usefunctionInfocyph\ArrayKit\chain;
// Optional: enable global helpers in projects that explicitly want them.require_once__DIR__ . '/vendor/infocyph/arraykit/src/functions.php';
Callback-based row helpers (ArrayMulti::sortBy(), sum(), maxBy(), minBy()) support ($row, $key).
DotNotation treats existing null keys/properties as present (does not fall back to defaults).
DotNotation::hasWildcard(), paths(), matches(), rename(), and move() are available for wildcard/path operations.
For untrusted/deep payloads, use bounded traversal variants: DotNotation::getSafe(), ArrayMulti::depthGuarded(), flattenGuarded(), and sortRecursiveGuarded().
LazyFileConfig namespace cache writes one cache file per namespace plus a shared __flat.php file containing only final scalar/null leaf values for exact-key fast paths.
Security
Protected by PHPForge — an automated quality and security gate for PHP projects.
Elegant, high-performance array manipulation, dot notation utilities, dynamic configuration, hookable collections, and more. From shallow single arrays to deeply nested data structures — ArrayKit provides a fluent, reliable toolkit for real-world PHP projects.