Yac can be installed in one of three ways: via PECL, via PIE, or by building it from source.
Це розширення » PECL не входить до складу PHP.
Інструкція щодо встановлення цього PECL-розширення є в розділі посібника Встановлення PECL-розширень. Більше інформації, як от нові випуски, файли для завантаження, файли з початковим кодом, інформація для дописувачів та список змін знаходиться тут: » https://pecl.php.net/package/yac.
Двійкові файли Windows (DLL) цього PECL-розширення доступні на вебсайті PECL.
Приклад #1 Installing Yac with PECL
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.
Приклад #2 Installing Yac with PIE
pie install laruence/yac
Optional serializers can be enabled at install time:
Приклад #3 Installing Yac with PIE and a serializer
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.
Приклад #4 Building Yac from source
/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.