Swoole
PHP的异步、并行、高性能网络通信引擎,使用纯C语言编写,提供了[PHP语言的异步多线程服务器](/wiki/page/p-server.html),[异步TCP/UDP网络客户端](/wiki/page/p-client.html),[异步MySQL](/wiki/page/517.html),[异步Redis](/wiki/page/p-redis.html),[数据库连接池](https://github.com/swoole/framework/blob/master/tests/async_mysql.php),[AsyncTask](/wiki/page/134.html),[消息队列](http://wiki.swoole.com/wiki/page/289.html),[毫秒定时器](/wiki/page/244.html),[异步文件读写](/wiki/page/183.html),[异步DNS查询](/wiki/page/186.html)。 Swoole内置了[Http/WebSocket服务器端](/wiki/page/326.html)/[客户端](/wiki/page/p-http_client.html)、[Http2.0服务器端](/wiki/page/326.html)。
Swoole底层内置了异步非阻塞、多线程的网络IO服务器。PHP程序员仅需处理事件回调即可,无需关心底层。与`Nginx`/`Tornado`/`Node.js`等全异步的框架不同,Swoole既支持全异步,也支持同步。
除了异步IO的支持之外,Swoole为PHP多进程的模式设计了多个并发数据结构和IPC通信机制,可以大大简化多进程并发编程的工作。其中包括了[并发原子计数器](/wiki/page/p-atomic.html),[并发HashTable](/wiki/page/p-table.html),[Channel](/wiki/page/p-channel.html),[Lock](/wiki/page/p-lock.html),[进程间通信IPC](/wiki/page/363.html)等丰富的功能特性。
Swoole从2.0版本开始支持了**[内置协程](/wiki/page/p-coroutine.html)**,可以使用完全同步的代码实现异步程序。PHP代码无需额外增加任何关键词,底层自动进行协程调度,实现异步。
__Swoole__可以广泛应用于互联网、移动通信、企业软件、网络游戏、物联网、车联网、智能家庭等领域。 使用`PHP+Swoole`作为网络通信框架,可以使企业IT研发团队的效率大大提升,更加专注于开发创新产品。
Swoole是开源免费的自由软件,授权协议是`Apache2.0`。企业和个人开发者均可免费使用Swoole的代码,并且在Swoole之上所作的修改可用于商业产品,无需开源(注:必须保留原作者的版权声明)。
> 1.8.7或更高版本已完全兼容PHP7
* 国内Git镜像:[http://git.oschina.net/swoole/swoole.git](http://git.oschina.net/swoole/swoole.git)
* 新手入门教程:[https://www.gitbook.com/book/linkeddestiny/easy-swoole/details](https://www.gitbook.com/book/linkeddestiny/easy-swoole/details)
* IDE自动提示工具 php-reflection-code:[https://github.com/flyhope/php-reflection-code](https://github.com/flyhope/php-reflection-code)
* IDE自动提示工具 swoole-ide-helper:[https://github.com/eaglewu/swoole-ide-helper](https://github.com/eaglewu/swoole-ide-helper)
* 下载离线CHM文档: [https://github.com/smalleyes/swoole-chm](https://github.com/smalleyes/swoole-chm)
* HHVM-Swoole:[https://github.com/swoole/hhvm-swoole](https://github.com/swoole/hhvm-swoole)
* C++-Swoole:[https://github.com/swoole/cpp-swoole](https://github.com/swoole/cpp-swoole)
* Swoole Docset: [https://github.com/halfstring/swoole-chinese-docset](https://github.com/halfstring/swoole-chinese-docset)
社区资源
----
* [SegmentFault网站Swoole专区](https://segmentfault.com/t/swoole)
* [开发者头条Swoole频道](https://toutiao.io/s/swoole)
* [OSC社区Swoole问答板块](http://www.oschina.net/question/tag/swoole-server)
* [知乎-Swoole专区](https://www.zhihu.com/topic#swoole)
* Swoole开发组QQ群:Swoole1.0: 193772828,Swoole2.0:494412579,与swoole的使用者和开发者进行交流
* [Swoole官方网站问答社区](http://group.swoole.com/)
* [PHP百科全书](http://php.swoole.com/)
微信公众号
-----

捐赠Swoole开源项目
----
您的捐赠是对Swoole项目开发组最大的鼓励和支持。我们会坚持开发维护下去。 您的捐赠将被用于:
* 持续和深入的开发
* 文档和社区的建设和维护
[开源中国-捐赠Swoole项目](http://git.oschina.net/swoole/swoole?donate=true)
PHP的异步、并行、高性能网络通信引擎,使用纯C语言编写,提供了[PHP语言的异步多线程服务器](/wiki/page/p-server.html),[异步TCP/UDP网络客户端](/wiki/page/p-client.html),[异步MySQL](/wiki/page/517.html),[异步Redis](/wiki/page/p-redis.html),[数据库连接池](https://github.com/swoole/framework/blob/master/tests/async_mysql.php),[AsyncTask](/wiki/page/134.html),[消息队列](http://wiki.swoole.com/wiki/page/289.html),[毫秒定时器](/wiki/page/244.html),[异步文件读写](/wiki/page/183.html),[异步DNS查询](/wiki/page/186.html)。 Swoole内置了[Http/WebSocket服务器端](/wiki/page/326.html)/[客户端](/wiki/page/p-http_client.html)、[Http2.0服务器端](/wiki/page/326.html)/[客户端](/wiki/page/708.html)。
Swoole底层内置了异步非阻塞、多线程的网络IO服务器。PHP程序员仅需处理事件回调即可,无需关心底层。与`Nginx`/`Tornado`/`Node.js`等全异步的框架不同,Swoole既支持全异步,也支持同步。
除了异步IO的支持之外,Swoole为PHP多进程的模式设计了多个并发数据结构和IPC通信机制,可以大大简化多进程并发编程的工作。其中包括了[并发原子计数器](/wiki/page/p-atomic.html),[并发HashTable](/wiki/page/p-table.html),[Channel](/wiki/page/p-channel.html),[Lock](/wiki/page/p-lock.html),[进程间通信IPC](/wiki/page/363.html)等丰富的功能特性。
Swoole从2.0版本开始支持了**[内置协程](/wiki/page/p-coroutine.html)**,可以使用完全同步的代码实现异步程序。PHP代码无需额外增加任何关键词,底层自动进行协程调度,实现异步。
__Swoole__可以广泛应用于互联网、移动通信、企业软件、网络游戏、物联网、车联网、智能家庭等领域。 使用`PHP+Swoole`作为网络通信框架,可以使企业IT研发团队的效率大大提升,更加专注于开发创新产品。
Swoole是开源免费的自由软件,授权协议是`Apache2.0`。企业和个人开发者均可免费使用Swoole的代码,并且在Swoole之上所作的修改可用于商业产品,无需开源(注:必须保留原作者的版权声明)。
> 1.8.7或更高版本已完全兼容PHP7
* 国内Git镜像:[http://git.oschina.net/swoole/swoole.git](http://git.oschina.net/swoole/swoole.git)
* 新手入门教程:[https://www.gitbook.com/book/linkeddestiny/easy-swoole/details](https://www.gitbook.com/book/linkeddestiny/easy-swoole/details)
* IDE自动提示工具 php-reflection-code:[https://github.com/flyhope/php-reflection-code](https://github.com/flyhope/php-reflection-code)
* IDE自动提示工具 swoole-ide-helper:[https://github.com/eaglewu/swoole-ide-helper](https://github.com/eaglewu/swoole-ide-helper)
* 下载离线CHM文档: [https://github.com/smalleyes/swoole-chm](https://github.com/smalleyes/swoole-chm)
* HHVM-Swoole:[https://github.com/swoole/hhvm-swoole](https://github.com/swoole/hhvm-swoole)
* C++-Swoole:[https://github.com/swoole/cpp-swoole](https://github.com/swoole/cpp-swoole)
* Swoole Docset: [https://github.com/halfstring/swoole-chinese-docset](https://github.com/halfstring/swoole-chinese-docset)
社区资源
----
* [SegmentFault网站Swoole专区](https://segmentfault.com/t/swoole)
* [开发者头条Swoole频道](https://toutiao.io/s/swoole)
* [OSC社区Swoole问答板块](http://www.oschina.net/question/tag/swoole-server)
* [知乎-Swoole专区](https://www.zhihu.com/topic#swoole)
* Swoole开发组QQ群:Swoole1.0: 193772828,Swoole2.0:494412579,与swoole的使用者和开发者进行交流
* [Swoole官方网站问答社区](http://group.swoole.com/)
* [PHP百科全书](http://php.swoole.com/)
微信公众号
-----

捐赠Swoole开源项目
----
您的捐赠是对Swoole项目开发组最大的鼓励和支持。我们会坚持开发维护下去。 您的捐赠将被用于:
* 持续和深入的开发
* 文档和社区的建设和维护
[开源中国-捐赠Swoole项目](http://git.oschina.net/swoole/swoole?donate=true)