php8.5
Home/ Manual/ reference / yac/ Installing Yac with PECL

Installing Yac with PECL

No external library is required.

Setup

Required

No external library is required.

Install

Yac can be installed in one of three ways: via PECL, via PIE, or by building it from source.

Moved

Info Packageyac.

Avail

Installing Yac with PECL

shell
pecl install yac

As of Yac 2.3.2, the extension can be installed with Pie, the PHP Installer for Extensions, by running the following on the command line.

Installing Yac with PIE

shell
pie install laruence/yac

Optional serializers can be enabled at install time:

Installing Yac with PIE and a serializer

shell
pie install laruence/yac --enable-json

The 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 Yac from source

shell
/path/to/phpize
./configure --with-php-config=/path/to/php-config
make && make install

The following configure options are available:

Values are compressed with LZ4 before being stored. The LZ4 compression backend was introduced in Yac 2.4.0, replacing the earlier FastLZ. By default, Yac uses the LZ4 copy bundled with the extension; no extra flag is needed. To link against the system LZ4 library instead, use the --with-system-lz4 switch, which requires the lz4.h header and liblz4 to be installed.

Alternative serializers can be compiled in with --enable-json, --enable-msgpack or --enable-igbinary, which register the corresponding extension as an optional dependency. The serializer used at runtime is selected with the yac.serializer ini directive.

Ini

Resources

This extension does not define any resources.

Source: reference/yac/setup.xml · from the official PHP manual (php/doc-en)