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.
The Trait component provides type-safe wrappers around PHP's built-in trait reflection and existence checks. It replaces loose trait_exists() calls with a consistent, intention-revealing API.
PSL separates existence checks into two distinct functions -- exists() (triggers autoloading) and defined() (checks only already-loaded definitions) -- so the intent is always clear.
@example('other/reflection-interface-trait.php')
See src/Psl/Trait/ for the full API.
How can I help you explore Laravel packages today?