azjezz / psl
PHP Standard Library
Fund package maintenance!
azjezz
Installs: 4 991 422
Dependents: 70
Suggesters: 2
Security: 0
Stars: 1 226
Watchers: 22
Forks: 71
Open Issues: 28
Requires
- php: ~8.2.0 || ~8.3.0 || ~8.4.0
- ext-bcmath: *
- ext-intl: *
- ext-json: *
- ext-mbstring: *
- ext-sodium: *
- revolt/event-loop: ^1.0.6
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.52.1
- php-coveralls/php-coveralls: ^2.7.0
- php-standard-library/psalm-plugin: ^2.3.0
- phpbench/phpbench: ^1.2.15
- phpunit/phpunit: ^9.6.18
- roave/infection-static-analysis-plugin: ^1.35.0
- squizlabs/php_codesniffer: ^3.9.0
- vimeo/psalm: ^5.23.1
Suggests
- php-standard-library/phpstan-extension: PHPStan integration
- php-standard-library/psalm-plugin: Psalm integration
- dev-next
- 3.1.0
- 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-chore/switch-to-mago
- dev-feat/network-tls
- dev-chore/php-81
- dev-ext
- dev-phantom
- dev-string-deprecations
- dev-ci/examples
This package is auto-updated.
Last update: 2024-12-15 16:22:20 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
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.