Get the App
SLTechnology News&Howtos  ›  Development  › 

How PHP7 installs event extensions

Shulou Source: shulou.com Published: 2022-06-03 09:47:31 11月15日 Update

Editor to share with you how to install PHP7 event extension, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

PHP7 installs the event extension

Libevent is a lightweight open source high-performance Imax O framework written in C language, which supports a variety of Imax O multiplexing technologies: epoll, poll, dev/poll, select and kqueue, etc.; supports events such as Imax O, timers and signals; registers event priority. PHP provides the corresponding extensions libevent and Event.

Compared with libevent ext, event ext has better performance and more comprehensive API, which allows us to use Libevent more amicably.

Install the Libevent library

The php event extension depends on the Libevent library and needs to be compiled and installed first (note that it is the Libevent library, non-libevent extension).

Git clone-- depth=1 https://github.com/nmathewson/Libevent.gitcd Libevent./autogen.sh./configure-- prefix=/usr/local/libeventmake & & make install install the Event extension

Can be installed directly using pecl

Pecl install eventdownloading event-2.5.3.tgz... Starting to download event-2.5.3.tgz (140913 bytes).. done: 140913 bytes50 source files Buildingrunning: phpizeConfiguring for:PHP Api Version: 20180731Zend Module Api No: 20180731Zend Extension Api No: 320180731Enable internal debugging in Event [no]: Enable sockets support in Event [yes]: libevent installation prefix [/ usr]: / usr/local/libevent...Build process completed successfullyInstalling'/ usr/local/php/lib/php/extensions/no-debug-non-zts-20180731/event.so'install ok: channel://pecl.php.net/event-2.5.3Extension event enabled in php.ini

View installation results

[root@localhost ~] # php-- ri eventeventEvent support = > enabledSockets support = > enabledDebug support = > disabledExtra functionality support including HTTP, DNS, and RPC = > enabledOpenSSL support = > enabledThread safety support = > disabledExtension version = > 2.5.3libevent2 headers version = > 2.2.0-alpha-dev above are all the contents of this article "how to install event extensions in PHP7". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Articles events content support not much priority signals multiple most timers performance technology more framework knowledge results industry language information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB vpn OPPO Reno Microsoft macOS