Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Psl Laravel Package

azjezz/psl

PSL (PHP Standard Library) offers a consistent, well-typed set of safer, async-ready APIs to replace PHP primitives. Covers async, collections, networking, I/O, cryptography, terminal UI, and type-safe data validation with predictable errors.

View on GitHub
Deep Wiki
Context7

Collection

The Collection component provides generic, object-oriented collection types as an alternative to PHP arrays. Collections are strongly typed, support generics via doc-block annotations, and offer a rich API for filtering, mapping, and slicing.

Each collection type comes in two variants: an immutable (readonly) version and a mutable version.

Type Immutable Mutable
Ordered list Vector<T> MutableVector<T>
Key-value map Map<Tk, Tv> MutableMap<Tk, Tv>
Unique values Set<T> MutableSet<T>

Vector

A Vector is an ordered, integer-indexed sequence of values -- similar to a PHP list<T>.

@example('collections/collection-vector.php')

Map

A Map is an ordered collection of key-value pairs. Keys must be int or string.

@example('collections/collection-map.php')

Set

A Set stores unique values with no duplicate entries. Values must be int or string (array-key types).

@example('collections/collection-set.php')

Common Operations

All collection types share a consistent API for reading, transforming, and slicing:

@example('collections/collection-common-operations.php')

All collections implement IteratorAggregate for use in foreach, and JsonSerializable for JSON encoding. Maps always serialize as JSON objects ({}), vectors and sets as JSON arrays ([]).

Mutable collections also implement ArrayAccess:

@example('collections/collection-array-access.php')

See src/Psl/Collection/ for the full API.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle