Installing Yar with PECL
The cURL library is required for the HTTP and HTTPS transports. The TCP transport is implemented with plain sockets and needs no extra library.
Setup
Required
The cURL library is required for the HTTP and HTTPS transports. The TCP transport is implemented with plain sockets and needs no extra library.
The JSON extension is required, which is bundled with PHP and always available as of PHP 8.0.0.
To use the msgpack packager, the msgpack extension must be installed and Yar must be built with the --enable-msgpack configure option.
Install
Yar can be installed in one of three ways: via PECL, via PIE, or by building it from source.
Moved
Info Packageyar.
Avail
Installing Yar with PECL
pecl install yarAs of Yar 2.4.0, the extension can be installed with Pie, the PHP Installer for Extensions, by running the following on the command line.
Installing Yar with PIE
pie install laruence/yarThe msgpack packager can be enabled at install time:
Installing Yar with PIE and msgpack
pie install laruence/yar --enable-msgpackThe source code is hosted on GitHub. To build the extension from source, run the following on the command line, replacing the paths with those of the local PHP installation.
Building Yar from source
/path/to/phpize
./configure --with-php-config=/path/to/php-config
make && make installThe following configure options are available:
--with-curlLocation of the cURL installation, if it is not found in the default include paths.
--enable-msgpackEnables the
msgpackpackager and makes themsgpackextension an optional dependency. When Yar is built with this option, the default value of yar.packager becomesmsgpack.--enable-epollUses Linux
epollinstead ofselect()for I/O multiplexing, available as of Yar 2.1.2. This can improveYar_Concurrent_Clientperformance under high concurrency. It only takes effect on Linux; on other platforms it is silently ignored.
Ini
Resources
This extension does not define any resources.