azjezz / psl
PHP Standard Library
Installs: 8 616 014
Dependents: 85
Suggesters: 2
Security: 0
Stars: 1 346
Watchers: 21
Forks: 80
Open Issues: 31
pkg:composer/azjezz/psl
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0
 - ext-bcmath: *
 - ext-intl: *
 - ext-json: *
 - ext-mbstring: *
 - ext-sodium: *
 - revolt/event-loop: ^1.0.7
 
Requires (Dev)
- carthage-software/mago: ^1.0.0-beta.32
 - infection/infection: ^0.31.2
 - php-coveralls/php-coveralls: ^2.7.0
 - phpbench/phpbench: ^1.4.0
 - phpunit/phpunit: ^9.6.22
 
Suggests
- php-standard-library/phpstan-extension: PHPStan integration
 - php-standard-library/psalm-plugin: Psalm integration
 
- dev-next
 - 4.2.0
 - 4.1.0
 - 4.0.x-dev
 - 4.0.1
 - 4.0.0
 - 3.3.x-dev
 - 3.3.0
 - 3.2.x-dev
 - 3.2.0
 - 3.1.x-dev
 - 3.1.0
 - 3.0.x-dev
 - 3.0.2
 - 3.0.1
 - 3.0.0
 - 2.9.x-dev
 - 2.9.1
 - 2.9.0
 - 2.8.x-dev
 - 2.8.0
 - 2.7.x-dev
 - 2.7.0
 - 2.6.x-dev
 - 2.6.0
 - 2.5.x-dev
 - 2.5.0
 - 2.4.x-dev
 - 2.4.1
 - 2.4.0
 - 2.3.x-dev
 - 2.3.1
 - 2.3.0
 - 2.2.x-dev
 - 2.2.0
 - 2.1.x-dev
 - 2.1.0
 - 2.0.x-dev
 - 2.0.4
 - 2.0.3
 - 2.0.2
 - 2.0.1
 - 2.0.0
 - 2.0.0-rc2
 - 2.0.0-rc1
 - 1.9.x-dev
 - 1.9.3
 - 1.9.2
 - 1.9.1
 - 1.9.0
 - 1.8.x-dev
 - 1.8.2
 - 1.8.1
 - 1.8.0
 - 1.7.x-dev
 - 1.7.4
 - 1.7.3
 - 1.7.2
 - 1.7.1
 - 1.7.0
 - 1.6.x-dev
 - 1.6.3
 - 1.6.2
 - 1.6.1
 - 1.6.0
 - 1.5.x-dev
 - 1.5.0
 - 1.4.x-dev
 - 1.4.1
 - 1.4.0
 - 1.3.x-dev
 - 1.3.1
 - 1.3.0
 - 1.2.x-dev
 - 1.2.0
 - 1.1.x-dev
 - 1.1.1
 - 1.1.0
 - 1.0.x-dev
 - 1.0.0
 - 0.1.x-dev
 - 0.1.2
 - 0.1.1
 - 0.1.0
 - dev-feat/network-tls
 
This package is auto-updated.
Last update: 2025-11-03 23:11:03 UTC
README
Important
π΅πΈ Support Palestine π΅πΈ
In light of recent events in Gaza, I encourage everyone to educate themselves on the ongoing issues in Palestine and consider supporting the people there. Here are some resources and donation links:
- Decolonize Palestine - An informative resource to better understand the situation in Palestine. Please take the time to read it.
 - One Ummah - Gaza Emergency Appeal - A platform to provide direct donations to help the people in Gaza.
 - Islamic Relief UK - Palestine Appeal - Another trusted platform to provide support for those affected in Palestine.
 
Thank you for taking a moment to bring awareness and make a difference. π΅πΈβ€οΈ
Psl - PHP Standard Library
Psl is a standard library for PHP, inspired by hhvm/hsl.
The goal of Psl is to provide a consistent, centralized, well-typed set of APIs for PHP programmers.
Example
<?php declare(strict_types=1); use Psl\Async; use Psl\TCP; use Psl\IO; use Psl\Shell; use Psl\Str; Async\main(static function(): int { IO\write_line('Hello, World!'); [$version, $connection] = Async\concurrently([ static fn() => Shell\execute('php', ['-v']), static fn() => TCP\connect('localhost', 1337), ]); $messages = Str\split($version, "\n"); foreach($messages as $message) { $connection->writeAll($message); } $connection->close(); return 0; });
Installation
Supported installation method is via composer:
composer require azjezz/psl:^4.0
Psalm Integration
Please refer to the php-standard-library/psalm-plugin repository.
PHPStan Integration
Please refer to the php-standard-library/phpstan-extension repository.
Documentation
You can read through the API documentation in docs/ directory.
Interested in contributing?
Have a look at CONTRIBUTING.md.
License
The MIT License (MIT). Please see LICENSE for more information.