Open Swoole (since 2017) is a programmatic server for PHP with async IO, coroutines and fibers: secure, reliable, high performance
- Documentation: https://www.swoole.co.uk/docs
- Twitter: https://twitter.com/openswoole
- Join Slack Group: https://goo.gl/forms/wooTTDmhbu30x4qC3
- Join Discord Channel: https://discord.gg/5QC57RNPpw
- IDE Helper & API: https://github.com/openswoole/ide-helper
As with any open source project, Open Swoole always provides the most reliable stability and the most powerful features in the latest released version. Please ensure as much as possible that you are using the latest version.
- Linux, OS X or Cygwin, WSL
- PHP 7.2.0 or later (The higher the version, the better the performance.)
- GCC 4.8 or later
pecl install openswoole
Please download the source packages from Releases or:
git clone https://github.com/openswoole/swoole-src.git && \
cd swoole-src
git checkout v4.8.1
Compile and install at the source folder:
phpize && \
./configure && \
make && make install
After compiling and installing the openswoole extension, you have to add a new line extension=openswoole.so
to php.ini
to enable Open Swoole. It is recommended to be added after all the other extensions because openswoole may depend on extensions: sockets, mysqlnd, curl etc.
for example:
./configure --enable-openssl --enable-sockets
--enable-openssl
or--with-openssl-dir=DIR
--enable-sockets
--enable-http2
--enable-mysqlnd
(need mysqlnd, it just for supporting$mysql->escape
method)--enable-swoole-json
--enable-swoole-curl
--with-postgres[=DIR]
If you upgrade from source, don't forget to
make clean
before you upgrade your swoole
pecl upgrade openswoole
cd swoole-src && git pull && make clean && make && sudo make install
- if you have changed PHP version, please re-run
phpize clean && phpize
then try to compile
If you like to involve the maintenance of this repo, it is better to get started by submitting PR, you will be invited to the dev group once there are significant contributions. Or join Slack group firstly, the team will provide mentoring and internal support to help you get started.
- Report issues and feedback
- Submit fixes, features via Pull Request
This project exists thanks to all the historical [Contributors].
Security issues should be reported privately, via email, to the Open Swoole develop team [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
PR are welcome if your framework is using openswoole
- Laravel Octane Laravel Octane supercharges your application's performance by serving your application using high-powered application servers.
- PHP Runtime make it easy to run any kind of PHP Application (Symfony, Laravel, PSR7, Native) with all kinds of Runtimes like OpenSwoole, Bref, Google Cloud Functions, Roadrunner and React PHP with minimal configuration.
- Mezzio Swoole allows you to run Mezzio and PSR-15 applications on Open Swoole.
Apache License Version 2.0 see http://www.apache.org/licenses/LICENSE-2.0.html