swoole is an asynchronous, parallel, high-performance network communication engine for PHP. It is written in pure C language and provides an asynchronous multi-threaded server in PHP language and an asynchronous TCP/UDP network client. , asynchronous MySQL, asynchronous Redis, database connection pool, AsyncTask, message queue, millisecond timer, asynchronous file reading and writing, asynchronous DNS query.
Swoole has built-in Http/WebSocket server/client and Http2.0 server. (Recommended learning: swoole video tutorial)
Go to the GitHub homepage to download the Swoole extension source code, address: https://github.com/swoole/swoole -src After downloading, compile and install according to the standard PHP extension compilation method.
Usually
phpize ./configure make install
After compilation and installation, modify php.ini and add extension=swoole.so to enable the swoole extension. It can also be loaded dynamically through dl('swoole.so'). It is recommended to modify php.ini.
Download the swoole_framework source code, address: https://github.com/swoole/framework. Just place it in your workspace directory.
swoole_framework is PHP code, you only need to require/include, no compilation and installation are required.
Configuration./configure As above, if your environment has multiple php environments, you should find the current environment using your
find / -iname php-config ./configure --with-php-config= 上边的查找结果就行
make make install
Then modify the php.ini file and add extension=swoole.so
Use phpinfo() to test whether there is a swoole extension
The above is the detailed content of How to enable swoole extension in PHP. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Linux new version
SublimeText3 Linux latest version
