Home > PHP Framework > Swoole > body text

Is swoole an extension or a framework?

(*-*)浩
Release: 2019-12-09 10:09:10
Original
2552 people have browsed it

Is swoole an extension or a framework?

The swoole has two parts. One is a PHP extension, developed in C, which is the core. The other is a framework, like Yii, TP, and Laravel, which is written in PHP code.

Install Swoole framework and extensions           (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. Generally

phpize
./configure
make install
Copy after login

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 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 need to compile and install.

The swoole extension itself provides web server functionality and can replace php-fpm. And if you only use the swoole framework, it can run in web servers such as nignx and apache like other PHP frameworks.

The swoole framework, like the PHP framework, is suitable for web development. The swoole extension provides a lower-level server communication mechanism, which can use UDP, TCP and other protocols, not just http.

The installation method is also different. The swoole extension is installed like other PHP extensions. You can use pecl or compile and install it. The swoole framework can be installed after being introduced with composer, or you can manually include/require after downloading the source code.

In addition, the swoole framework relies on the swoole extension and is an application example of the swoole extension. Swoole extension is the foundation. Based on swoole extension, a variety of frameworks can be made, not just web frameworks.

The above is the detailed content of Is swoole an extension or a framework?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!