定制 azjezz/psl 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

azjezz/psl

最新稳定版本:4.2.0

Composer 安装命令:

composer require azjezz/psl

包简介

PHP Standard Library

README 文档

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:

Thank you for taking a moment to bring awareness and make a difference. ????????❤️

Psl - PHP Standard Library

Unit tests status Static analysis status Coding standards status Coding standards status CII Best Practices Coverage Status MSI Total Downloads Latest Stable Version License

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.

统计信息

  • 总下载量: 9.64M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1376
  • 点击次数: 1
  • 依赖项目数: 86
  • 推荐数: 2

GitHub 信息

  • Stars: 1373
  • Watchers: 21
  • Forks: 80
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04