1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-25 16:22:18 +01:00
Files
archived-doc-ru/reference/ffi/setup.xml
2026-01-18 22:00:53 +00:00

119 lines
3.7 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: e14fdcab82e89bfb4ee221b1de9f4764c93abcf5 Maintainer: rjhdby Status: ready -->
<!-- Reviewed: no -->
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="ffi.setup">
&reftitle.setup;
<section xml:id="ffi.requirements">
&reftitle.required;
<simpara>
Для работы модуля необходимо установить библиотеку <link xlink:href="&url.libffi;">libffi</link>.
</simpara>
</section>
<!-- {{{ Installation -->
&reference.ffi.configure;
<!-- }}} -->
<section xml:id="ffi.configuration">
&reftitle.runtime;
&extension.runtime;
<para>
<table>
<title>&ConfigureOptions; FFI</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.ffi.enable">ffi.enable</link></entry>
<entry>"preload"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry/>
</row>
<row>
<entry><link linkend="ini.ffi.preload">ffi.preload</link></entry>
<entry>""</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry/>
</row>
</tbody>
</tgroup>
</table>
&ini.php.constants;
</para>
&ini.descriptions.title;
<variablelist>
<varlistentry xml:id="ini.ffi.enable">
<term>
<parameter>ffi.enable</parameter>
<type>string</type>
</term>
<listitem>
<simpara>
Позволяет разрешить (<literal>"true"</literal>) или запретить
(<literal>"false"</literal>) использование FFI API, либо
ограничить использование только для CLI SAPI и
предзагруженных файлов (<literal>"preload"</literal>).
</simpara>
<simpara>
Ограничения FFI API влияют только на класс
<classname>FFI</classname>, но не на перезагруженные
функции объекта <classname>FFI\CData</classname>.
Это значит, что можно создать объекты
<classname>FFI\CData</classname> в предзагружаемых
файлах и использовать потом напрямую из скриптов PHP.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.ffi.preload">
<term>
<parameter>ffi.preload</parameter>
<type>string</type>
</term>
<listitem>
<simpara>
Позволяет предзагружать привязки FFI во время
старта, что невозможно с
<methodname>FFI::load</methodname>,
если включено <link linkend="ini.opcache.preload-user">opcache.preload_user</link>.
Эта директива принимает список разделителей имён файлов
<constant>DIRECTORY_SEPARATOR</constant>.
Предзагруженные привязки доступны с помощью
вызова <methodname>FFI::scope</methodname>.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->