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

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