PHPackages                             jenner/async-http-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. jenner/async-http-php

ActivePackage[HTTP &amp; Networking](/categories/http)

jenner/async-http-php
=====================

php http async client

0.6(9y ago)306.3k↓50%14MITPHPPHP &gt;=5.3.0

Since Aug 25Pushed 9y ago7 watchersCompare

[ Source](https://github.com/huyanping/async-http-php)[ Packagist](https://packagist.org/packages/jenner/async-http-php)[ RSS](/packages/jenner-async-http-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

async-http-php
==============

[](#async-http-php)

An Async HTTP client based on curl\_mulit\* which is really simple and fast.
This project is a teaching experiment and I don't suggest to use it in a production environment, even though it is stable. You can try to use [guzzle](http://docs.guzzlephp.org/en/latest/quickstart.html#async-requests).

Description
-----------

[](#description)

- If you want to use ssl or something else when you request a website, you can just realize a task class and extends the AbstractTask class.
- You can register a handler using Task object, when the response is usable the Async class will call the handler to handle the response.
- It will also return the response if it is handled by the handler or not.
- The longer the requests execute, the more time it will save.

example code:

```
$async = new \Jenner\Http\Async();
$task = \Jenner\Http\Task::createGet("http://www.baidu.com");
$async->attach($task, "baidu");

$task2 = \Jenner\Http\Task::createGet("http://www.sina.com");
$async->attach($task2, "sina");

$task3 = \Jenner\Http\Task::createGet("http://www.qq.com");
$async->attach($task3, "qq");

/**
 * you can do something here before receive the http responses
 * eg. query data from mysql or redis.
 */

$async-start();

while(true){
    // nonblock
    if(!$async->isDone()){
        echo "I am running" . PHP_EOL;
        sleep(1);
        continue;
    }

    $result = $async->execute();
    print_r($result);
    break;
}

/**
 * or you just call execute. it will block the process until all tasks are done.
 * $result = $async->execute();
 * print_r($result);
 */
```

use promise:

```
$async = new \Jenner\Http\Async();
$task = \Jenner\Http\Task::createGet("http://www.baidu.com");
$promise = $async->attach($task, "baidu");

$promise->then(
    function ($data) {
        echo 'success:' . var_export($data, true) . PHP_EOL;
    },
    function ($data) {
        echo 'error:' . var_export($data, true) . PHP_EOL;
    }
);

$async->execute();
```

Performance tests
-----------------

[](#performance-tests)

```
[root@huyanping async-http-php]# php tests/performance_sync.php
------------------------------------------
mark:[total diff]
time:55.121547937393s
memory_real:1536KB
memory_emalloc:1300.5859375KB
memory_peak_real:2304KB
memory_peak_emalloc:1898.640625KB
[root@huyanping async-http-php]# php tests/performance_async.php
------------------------------------------
mark:[total diff]
time:4.6412570476532s
memory_real:256KB
memory_emalloc:187.7109375KB
memory_peak_real:13312KB
memory_peak_emalloc:10387.8671875KB
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Recently: every ~106 days

Total

6

Last Release

3466d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d132b55d12cd603f8cce9c152999e2b3f98748d56fe8a21adf62d5830d88d87?d=identicon)[huyanping](/maintainers/huyanping)

---

Top Contributors

[![white-poto](https://avatars.githubusercontent.com/u/4362540?v=4)](https://github.com/white-poto "white-poto (77 commits)")

---

Tags

phpasynchttp client

### Embed Badge

![Health badge](/badges/jenner-async-http-php/health.svg)

```
[![Health](https://phpackages.com/badges/jenner-async-http-php/health.svg)](https://phpackages.com/packages/jenner-async-http-php)
```

###  Alternatives

[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)[claude-php/claude-php-sdk

A universal, framework-agnostic PHP SDK for the Anthropic Claude API with PSR compliance

13920.7k2](/packages/claude-php-claude-php-sdk)[swoole-bundle/swoole-bundle

Open/Swoole Symfony Bundle

6650.4k](/packages/swoole-bundle-swoole-bundle)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[simpod/clickhouse-client

PHP ClickHouse Client

19116.7k](/packages/simpod-clickhouse-client)[phpgt/fetch

Asynchronous HTTP client with promises.

3724.0k3](/packages/phpgt-fetch)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
