noctud

noctud / collection

Public

🗺️ Type-safe, mutable/immutable and key-preserving PHP 8.4+ collections

41
0
100% credibility
Found Feb 17, 2026 at 34 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
PHP
AI Summary

Noctud Collection provides type-safe, immutable and mutable lists, sets, and maps for PHP with expressive operations like filtering, mapping, sorting, and grouping, inspired by Kotlin.

How It Works

1
🔍 Discover smarter data organizers

You're working on a project and tired of messy lists turning into headaches, so you find Noctud Collection that promises clean, reliable ways to group and sort your information.

2
📦 Bring it into your project

With a quick addition, the collection tools join your work, ready to handle lists, unique groups, and key-value pairs just like magic boxes for your data.

3
✨ Build your first smart group

You create a list or map that knows exactly what kind of items it holds, feeling safe and powerful as it sorts, filters, and transforms effortlessly.

4
🔄 Switch between fixed and flexible

Choose unchangeable versions to keep data safe or flexible ones to tweak as needed, making your work both secure and adaptable.

5
⚡ Perform quick operations

Filter out junk, group similar items, or sort everything perfectly with simple instructions that feel natural and fast.

🎉 Enjoy bug-free, speedy data

Your project runs smoother with reliable groups that prevent mistakes and perform great, letting you focus on creating instead of fixing.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 34 to 41 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is collection?

Noctud Collection brings Kotlin-style, type-safe Lists, Sets, and Maps to PHP 8.4+, solving the mess of native arrays that silently cast keys, mutate unexpectedly, and lack generics. Developers get mutable or immutable collections with preserved key types (nulls, floats, objects stay exact), lazy initialization via closures, and chainable ops like filter, map, flatMap, sortedBy, groupBy. Factory functions like listOf(), mapOf(), or optimized stringMapOf() make building expressive pipelines dead simple—no more array_filter hacks or type juggling.

Why is it gaining traction?

It hooks PHP devs with full static analysis (PHPStan/Psalm generics flow through chains), object-as-key support via Hashable, and live views ($map->keys, $map->values as real Sets/Collections). Unlike loose laravel collection github alternatives or basic array libs, it enforces strict mutable typing while allowing immutable widening, plus tracked mutations ($set->tracked()->add('a')->changed). PHP 8.4+ lazy objects and copy-on-write switching keep perf close to arrays, with ~50% less memory for int/string maps.

Who should use this?

Backend PHP devs on 8.4+ building APIs or data pipelines, especially Laravel folks ditching laravel collection github for type_safe github precision. Suited for domain models needing immutable snapshots (e.g., event sourcing), config maps with weird keys, or query results with filter/sort chains. Game devs handling rom collection github assets or prompt collection github lists will love the sorting and views.

Verdict

Solid beta for type-safe PHP collections, with excellent docs and codecov coverage, but 33 stars and 1.0% credibility mean it's early—test in non-prod. Grab for new 8.4+ projects if you hate array footguns; skip for legacy stability.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.