swoole / swoole.github.io

Swoole's website, docs & blog mainly focused on the english-speaking community.

Home Page:https://swoole.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swoole is an event-driven, asynchronous, coroutine-based concurrency library with high performance for PHP.

<?php

$server = new Swoole\Http\Server('0.0.0.0', 9501);

$server->on('start', function () {
    echo "Listening at http://localhost:9501\n";
});

$server->on('request', function ($req, $res) {
    $res->end('Hello, World!');
});

$server->start();

Getting started

Swoole is distributed as any other PHP extension. It is easy to get started.

Installation

pecl install swoole

Or run with Docker:

docker run --rm phpswoole/swoole "php --ri swoole"

About

Swoole's website, docs & blog mainly focused on the english-speaking community.

https://swoole.dev

License:Apache License 2.0