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 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.

View on GitHub
Deep Wiki
Context7

Interoperability

The Interoperability component provides a set of interfaces for converting between PSL types and their PHP standard library (stdlib) or intl extension equivalents.

These interfaces establish a uniform contract for bidirectional conversion, allowing PSL types to interoperate seamlessly with native PHP types.

Usage

@example('other/interoperability-conversion.php')

Conversion Interfaces

The component defines four interfaces covering all conversion directions:

  • ToStdlib -- convert a PSL type to its PHP standard library equivalent (e.g. PSL DateTime to DateTimeImmutable)
  • FromStdlib -- create a PSL type from its PHP standard library equivalent (e.g. DateTimeImmutable to PSL DateTime)
  • ToIntl -- convert a PSL type to its intl extension equivalent (e.g. PSL Timezone to IntlTimeZone)
  • FromIntl -- create a PSL type from its intl extension equivalent (e.g. IntlTimeZone to PSL Timezone)

Implementations

The following PSL types implement these interfaces:

PSL Type ToStdlib FromStdlib ToIntl FromIntl
DateTime\DateTime DateTimeImmutable DateTimeImmutable IntlCalendar IntlCalendar
DateTime\Timestamp DateTimeImmutable DateTimeImmutable - -
DateTime\Duration DateInterval - - -
DateTime\Timezone DateTimeZone DateTimeZone IntlTimeZone IntlTimeZone

See src/Psl/Interoperability/ 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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4