azjezz/psl
PSL is a modern, well-typed standard library for PHP 8.4+, inspired by HHVM’s HSL. It offers safer, predictable APIs for async, collections, networking, I/O, crypto, terminal UI, and robust data validation—replacing brittle built-ins with consistent alternatives.
Async\concurrently), reducing race conditions and improving observability.Type\shape()) to catch bugs in validation layers (API inputs, config files) before runtime.socket_* functions.Vec\map(), Dict\pull()) for cleaner ETL or batch processing.Async\concurrently).Type combinators and Promise pipelines.Graph algorithms.array_map with Vec\map).Adopt PSL if:
Type validation fails fast) over dynamic typing.Look elsewhere if:
"PSL is a ‘batteries-included’ toolkit for PHP that lets us build faster, safer, and more scalable applications without reinventing the wheel. Think of it as PHP’s answer to Python’s typing module or Java’s java.util—but with modern async support and strict type safety. For example:
"PSL gives us superpowers for PHP 8.4+ projects:
Async\concurrently to run tasks in parallel with structured concurrency (like Go’s goroutines).Type\shape() and Type\vec()—faster than runtime checks.array_map/array_filter with Vec\map()/Vec\filter() that return typed results (no more array_key_exists headaches).socket_create boilerplate).Key Selling Points:
How can I help you explore Laravel packages today?