[doc-en] master: opcache: fix XML to remove useless wrapping para tags via script (#5127)

From: Date: Sun, 18 Jan 2026 18:50:05 +0000
Subject: [doc-en] master: opcache: fix XML to remove useless wrapping para tags via script (#5127)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-22984@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Committer: GitHub (web-flow) Pusher: Girgias Date: 2026-01-18T18:50:02Z Commit: https://github.com/php/doc-en/commit/9d2e638f2c3417c893c2cf0813ed35e3c99aa2c4 Raw diff: https://github.com/php/doc-en/commit/9d2e638f2c3417c893c2cf0813ed35e3c99aa2c4.diff opcache: fix XML to remove useless wrapping para tags via script (#5127) Changed paths: M reference/opcache/functions/opcache-compile-file.xml M reference/opcache/functions/opcache-get-configuration.xml M reference/opcache/functions/opcache-get-status.xml M reference/opcache/functions/opcache-invalidate.xml M reference/opcache/functions/opcache-is-script-cached.xml M reference/opcache/functions/opcache-reset.xml M reference/opcache/ini.xml Diff: diff --git a/reference/opcache/functions/opcache-compile-file.xml b/reference/opcache/functions/opcache-compile-file.xml index db3e98fe837a..409733ab9cb2 100644 --- a/reference/opcache/functions/opcache-compile-file.xml +++ b/reference/opcache/functions/opcache-compile-file.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="function.opcache-compile-file" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.opcache-compile-file"> <refnamediv> <refname>opcache_compile_file</refname> <refpurpose>Compiles and caches a PHP script without executing it</refpurpose> @@ -53,11 +53,9 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><function>opcache_invalidate</function></member> - </simplelist> - </para> + <simplelist> + <member><function>opcache_invalidate</function></member> + </simplelist> </refsect1> </refentry> <!-- Keep this comment at the end of the file diff --git a/reference/opcache/functions/opcache-get-configuration.xml b/reference/opcache/functions/opcache-get-configuration.xml index 85313313f69f..3021315a251d 100644 --- a/reference/opcache/functions/opcache-get-configuration.xml +++ b/reference/opcache/functions/opcache-get-configuration.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="function.opcache-get-configuration" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.opcache-get-configuration"> <refnamediv> <refname>opcache_get_configuration</refname> <refpurpose>Get configuration information about the cache</refpurpose> @@ -32,19 +32,17 @@ <refsect1 role="errors"> &reftitle.errors; <para> - If <literal>opcache.restrict_api</literal> is in use and the current path + If <literal>opcache.restrict_api</literal> is in use and the current path is in violation of the rule, an E_WARNING will be raised; no status information will be returned. </para> </refsect1> - + <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><function>opcache_get_status</function></member> - </simplelist> - </para> + <simplelist> + <member><function>opcache_get_status</function></member> + </simplelist> </refsect1> </refentry> diff --git a/reference/opcache/functions/opcache-get-status.xml b/reference/opcache/functions/opcache-get-status.xml index 0276e284ff48..c5d7f2489a1d 100644 --- a/reference/opcache/functions/opcache-get-status.xml +++ b/reference/opcache/functions/opcache-get-status.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="function.opcache-get-status" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.opcache-get-status"> <refnamediv> <refname>opcache_get_status</refname> <refpurpose>Get status information about the cache</refpurpose> @@ -43,7 +43,7 @@ <refsect1 role="errors"> &reftitle.errors; <para> - If <literal>opcache.restrict_api</literal> is in use and the current path + If <literal>opcache.restrict_api</literal> is in use and the current path is in violation of the rule, an E_WARNING will be raised; no status information will be returned. </para> @@ -174,14 +174,12 @@ array(9) { </screen> </example> </refsect1> - + <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><function>opcache_get_configuration</function></member> - </simplelist> - </para> + <simplelist> + <member><function>opcache_get_configuration</function></member> + </simplelist> </refsect1> </refentry> diff --git a/reference/opcache/functions/opcache-invalidate.xml b/reference/opcache/functions/opcache-invalidate.xml index 2bfb9cf3fa47..0d21b5054c51 100644 --- a/reference/opcache/functions/opcache-invalidate.xml +++ b/reference/opcache/functions/opcache-invalidate.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="function.opcache-invalidate" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.opcache-invalidate"> <refnamediv> <refname>opcache_invalidate</refname> <refpurpose>Invalidates a cached script</refpurpose> @@ -55,12 +55,10 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><function>opcache_compile_file</function></member> - <member><function>opcache_reset</function></member> - </simplelist> - </para> + <simplelist> + <member><function>opcache_compile_file</function></member> + <member><function>opcache_reset</function></member> + </simplelist> </refsect1> </refentry> <!-- Keep this comment at the end of the file diff --git a/reference/opcache/functions/opcache-is-script-cached.xml b/reference/opcache/functions/opcache-is-script-cached.xml index 03df796c2128..ed3de87965bb 100644 --- a/reference/opcache/functions/opcache-is-script-cached.xml +++ b/reference/opcache/functions/opcache-is-script-cached.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="function.opcache-is-script-cached" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.opcache-is-script-cached"> <refnamediv> <refname>opcache_is_script_cached</refname> <refpurpose>Tells whether a script is cached in OPCache</refpurpose> @@ -43,11 +43,9 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><function>opcache_compile_file</function></member> - </simplelist> - </para> + <simplelist> + <member><function>opcache_compile_file</function></member> + </simplelist> </refsect1> </refentry> <!-- Keep this comment at the end of the file diff --git a/reference/opcache/functions/opcache-reset.xml b/reference/opcache/functions/opcache-reset.xml index ee70f2683f9c..b0b06b521c42 100644 --- a/reference/opcache/functions/opcache-reset.xml +++ b/reference/opcache/functions/opcache-reset.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<refentry xml:id="function.opcache-reset" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.opcache-reset"> <refnamediv> <refname>opcache_reset</refname> <refpurpose>Resets the contents of the opcode cache</refpurpose> @@ -11,7 +10,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>opcache_reset</methodname> - <void /> + <void/> </methodsynopsis> <para> This function resets the entire opcode cache. After calling @@ -36,15 +35,12 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><function>opcache_invalidate</function></member> - <member><function>opcache_get_status</function></member> - </simplelist> - </para> + <simplelist> + <member><function>opcache_invalidate</function></member> + <member><function>opcache_get_status</function></member> + </simplelist> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/opcache/ini.xml b/reference/opcache/ini.xml index d4e803d79988..cac9e5f1bee6 100644 --- a/reference/opcache/ini.xml +++ b/reference/opcache/ini.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<sect1 xml:id="opcache.configuration" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<sect1 xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="opcache.configuration"> &reftitle.runtime; &extension.runtime; <para> @@ -20,7 +20,7 @@ <entry><link linkend="ini.opcache.enable">opcache.enable</link></entry> <entry>1</entry> <entry><constant>INI_ALL</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.enable-cli">opcache.enable_cli</link></entry> @@ -29,59 +29,58 @@ <entry>Between PHP 7.1.2 and 7.1.6 inclusive, the default was <literal>1</literal></entry> </row> <row> - <entry><link - linkend="ini.opcache.memory-consumption">opcache.memory_consumption</link></entry> + <entry><link linkend="ini.opcache.memory-consumption">opcache.memory_consumption</link></entry> <entry>128</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.interned-strings-buffer">opcache.interned_strings_buffer</link></entry> <entry>8</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.max-accelerated-files">opcache.max_accelerated_files</link></entry> <entry>10000</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.max-wasted-percentage">opcache.max_wasted_percentage</link></entry> <entry>5</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.use-cwd">opcache.use_cwd</link></entry> <entry>1</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link></entry> <entry>1</entry> <entry><constant>INI_ALL</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link></entry> <entry>2</entry> <entry><constant>INI_ALL</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.revalidate-path">opcache.revalidate_path</link></entry> <entry>0</entry> <entry><constant>INI_ALL</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.save-comments">opcache.save_comments</link></entry> <entry>1</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.fast-shutdown">opcache.fast_shutdown</link></entry> @@ -93,7 +92,7 @@ <entry><link linkend="ini.opcache.enable-file-override">opcache.enable_file_override</link></entry> <entry>0</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.optimization-level">opcache.optimization_level</link></entry> @@ -111,19 +110,19 @@ <entry><link linkend="ini.opcache.dups-fix">opcache.dups_fix</link></entry> <entry>0</entry> <entry><constant>INI_ALL</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.blacklist-filename">opcache.blacklist_filename</link></entry> <entry>""</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.max-file-size">opcache.max_file_size</link></entry> <entry>0</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.consistency-checks">opcache.consistency_checks</link></entry> @@ -135,19 +134,19 @@ <entry><link linkend="ini.opcache.force-restart-timeout">opcache.force_restart_timeout</link></entry> <entry>180</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.error-log">opcache.error_log</link></entry> <entry>""</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link></entry> <entry>1</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.record-warnings">opcache.record_warnings</link></entry> @@ -159,13 +158,13 @@ <entry><link linkend="ini.opcache.preferred-memory-model">opcache.preferred_memory_model</link></entry> <entry>""</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.protect-memory">opcache.protect_memory</link></entry> <entry>0</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.mmap-base">opcache.mmap_base</link></entry> @@ -177,25 +176,25 @@ <entry><link linkend="ini.opcache.restrict-api">opcache.restrict_api</link></entry> <entry>""</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.file_update_protection">opcache.file_update_protection</link></entry> <entry>2</entry> <entry><constant>INI_ALL</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.huge_code_pages">opcache.huge_code_pages</link></entry> <entry>0</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.lockfile_path">opcache.lockfile_path</link></entry> <entry>"/tmp"</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.opt_debug_level">opcache.opt_debug_level</link></entry> @@ -207,19 +206,19 @@ <entry><link linkend="ini.opcache.file-cache">opcache.file_cache</link></entry> <entry>&null;</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.file-cache-only">opcache.file_cache_only</link></entry> <entry>0</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.file-cache-consistency-checks">opcache.file_cache_consistency_checks</link></entry> <entry>1</entry> <entry><constant>INI_SYSTEM</constant></entry> - <entry></entry> + <entry/> </row> <row> <entry><link linkend="ini.opcache.file-cache-fallback">opcache.file_cache_fallback</link></entry> @@ -370,274 +369,273 @@ </table> &ini.php.constants; </para> - + &ini.descriptions.title; - - <para> - <variablelist> - <varlistentry xml:id="ini.opcache.enable"> - <term> - <parameter>opcache.enable</parameter> - <type>bool</type> - </term> - <listitem> - <para> - Enables the opcode cache. When disabled, code is not optimised or - cached. The setting <literal>opcache.enable</literal> can not be - enabled at runtime through <function>ini_set</function>, it can only - be disabled. Trying to enable it in a script will generate a warning. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.enable-cli"> - <term> - <parameter>opcache.enable_cli</parameter> - <type>bool</type> - </term> - <listitem> - <para> - Enables the opcode cache for the CLI version of PHP. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.memory-consumption"> - <term> - <parameter>opcache.memory_consumption</parameter> - <type>int</type> - </term> - <listitem> - <para> - The size of the shared memory storage used by OPcache, in megabytes. - The minimum permissible value is <literal>"8"</literal>, - which is enforced if a smaller value is set. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.interned-strings-buffer"> - <term> - <parameter>opcache.interned_strings_buffer</parameter> - <type>int</type> - </term> - <listitem> - <para> - The amount of memory used to store interned strings, in megabytes. - The maximum value is 32767 on 64bit architectures, - and 4095 on 32bit architectures. - </para> + + <variablelist> + <varlistentry xml:id="ini.opcache.enable"> + <term> + <parameter>opcache.enable</parameter> + <type>bool</type> + </term> + <listitem> + <para> + Enables the opcode cache. When disabled, code is not optimised or + cached. The setting <literal>opcache.enable</literal> can not be + enabled at runtime through <function>ini_set</function>, it can only + be disabled. Trying to enable it in a script will generate a warning. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.enable-cli"> + <term> + <parameter>opcache.enable_cli</parameter> + <type>bool</type> + </term> + <listitem> + <para> + Enables the opcode cache for the CLI version of PHP. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.memory-consumption"> + <term> + <parameter>opcache.memory_consumption</parameter> + <type>int</type> + </term> + <listitem> + <para> + The size of the shared memory storage used by OPcache, in megabytes. + The minimum permissible value is <literal>"8"</literal>, + which is enforced if a smaller value is set. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.interned-strings-buffer"> + <term> + <parameter>opcache.interned_strings_buffer</parameter> + <type>int</type> + </term> + <listitem> + <para> + The amount of memory used to store interned strings, in megabytes. + The maximum value is 32767 on 64bit architectures, + and 4095 on 32bit architectures. + </para> + <note> + <simpara> + Prior to PHP 8.4.0, the maximum value was 4095 megabytes on all + architectures. + </simpara> + </note> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.max-accelerated-files"> + <term> + <parameter>opcache.max_accelerated_files</parameter> + <type>int</type> + </term> + <listitem> + <para> + The maximum number of keys (and therefore scripts) in the OPcache hash + table. The actual value used will be the first number in the set of + prime numbers + <literal>{ 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }</literal> + that is greater than or equal to the configured value. The minimum value is 200. The maximum + value is 1000000. + Values outside of this range are clamped to the permissible range. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.max-wasted-percentage"> + <term> + <parameter>opcache.max_wasted_percentage</parameter> + <type>int</type> + </term> + <listitem> + <para> + The maximum percentage of wasted memory that is allowed before a restart + is scheduled, if there is insufficient free memory. + The maximum permissible value is <literal>"50"</literal>, + which is enforced if a larger value is set. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.use-cwd"> + <term> + <parameter>opcache.use_cwd</parameter> + <type>bool</type> + </term> + <listitem> + <para> + If enabled, OPcache appends the current working directory to the script + key, thereby eliminating possible collisions between files with the same + base name. Disabling this directive improves performance, but may break + existing applications. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.validate-timestamps"> + <term> + <parameter>opcache.validate_timestamps</parameter> + <type>bool</type> + </term> + <listitem> + <para> + If enabled, OPcache will check for updated scripts every + <link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link> + seconds. When this directive is disabled, you must reset OPcache + manually via <function>opcache_reset</function>, + <function>opcache_invalidate</function> or by restarting the Web server + for changes to the filesystem to take effect. <note> <simpara> - Prior to PHP 8.4.0, the maximum value was 4095 megabytes on all - architectures. + OPcache may still validate the timestamp of a file at compile-time if + <link linkend="ini.opcache.file_update_protection">opcache.file_update_protection</link> + or <link linkend="ini.opcache.max-file-size">opcache.max_file_size</link> + options are set to non-zero values. </simpara> </note> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.max-accelerated-files"> - <term> - <parameter>opcache.max_accelerated_files</parameter> - <type>int</type> - </term> - <listitem> - <para> - The maximum number of keys (and therefore scripts) in the OPcache hash - table. The actual value used will be the first number in the set of - prime numbers - <literal>{ 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }</literal> - that is greater than or equal to the configured value. The minimum value is 200. The maximum - value is 1000000. - Values outside of this range are clamped to the permissible range. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.max-wasted-percentage"> - <term> - <parameter>opcache.max_wasted_percentage</parameter> - <type>int</type> - </term> - <listitem> - <para> - The maximum percentage of wasted memory that is allowed before a restart - is scheduled, if there is insufficient free memory. - The maximum permissible value is <literal>"50"</literal>, - which is enforced if a larger value is set. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.use-cwd"> - <term> - <parameter>opcache.use_cwd</parameter> - <type>bool</type> - </term> - <listitem> - <para> - If enabled, OPcache appends the current working directory to the script - key, thereby eliminating possible collisions between files with the same - base name. Disabling this directive improves performance, but may break - existing applications. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.validate-timestamps"> - <term> - <parameter>opcache.validate_timestamps</parameter> - <type>bool</type> - </term> - <listitem> - <para> - If enabled, OPcache will check for updated scripts every - <link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link> - seconds. When this directive is disabled, you must reset OPcache - manually via <function>opcache_reset</function>, - <function>opcache_invalidate</function> or by restarting the Web server - for changes to the filesystem to take effect. - <note> - <simpara> - OPcache may still validate the timestamp of a file at compile-time if - <link linkend="ini.opcache.file_update_protection">opcache.file_update_protection</link> - or <link linkend="ini.opcache.max-file-size">opcache.max_file_size</link> - options are set to non-zero values. - </simpara> - </note> - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.revalidate-freq"> - <term> - <parameter>opcache.revalidate_freq</parameter> - <type>int</type> - </term> - <listitem> - <para> - How often to check script timestamps for updates, in seconds. - <literal>0</literal> will result in OPcache checking for updates on - every request. - </para> - <para> - This configuration directive is ignored if - <link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link> - is disabled. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.revalidate-path"> - <term> - <parameter>opcache.revalidate_path</parameter> - <type>bool</type> - </term> - <listitem> - <para> - If disabled, existing cached files using the same - <link linkend="ini.include-path">include_path</link> will be reused. - Thus, if a file with the same name is elsewhere in the include_path, it - won't be found. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.save-comments"> - <term> - <parameter>opcache.save_comments</parameter> - <type>bool</type> - </term> - <listitem> - <para> - If disabled, all documentation comments will be discarded from the - opcode cache to reduce the size of the optimised code. Disabling this - configuration directive may break applications and frameworks that rely - on comment parsing for annotations, including Doctrine, Zend Framework 2 - and PHPUnit. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.fast-shutdown"> - <term> - <parameter>opcache.fast_shutdown</parameter> - <type>bool</type> - </term> - <listitem> - <para> - If enabled, a fast shutdown sequence is used that doesn't free each - allocated block, but relies on the Zend Engine memory manager to - deallocate the entire set of request variables en masse. - </para> - <para> - This directive has been removed in PHP 7.2.0. A variant of the fast - shutdown sequence has been integrated into PHP and will be automatically - used if possible. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.enable-file-override"> - <term> - <parameter>opcache.enable_file_override</parameter> - <type>bool</type> - </term> - <listitem> - <para> - When enabled, the opcode cache will be checked for whether a file has - already been cached when <function>file_exists</function>, - <function>is_file</function> and <function>is_readable</function> are - called. This may increase performance in applications that check the - existence and readability of PHP scripts, but risks returning stale data - if - <link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link> - is disabled. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.optimization-level"> - <term> - <parameter>opcache.optimization_level</parameter> - <type>int</type> - </term> - <listitem> - <para> - A bitmask that controls which optimisation passes are executed. - The default is to apply all safe optimizations. - Changing the default is mostly useful for debugging/developing the optimizer - (see also <link linkend="ini.opcache.opt_debug_level">opcache.opt_debug_level</link>). - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.inherited-hack"> - <term> - <parameter>opcache.inherited_hack</parameter> - <type>bool</type> - </term> - <listitem> - <para> - This configuration directive is ignored. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.dups-fix"> - <term> - <parameter>opcache.dups_fix</parameter> - <type>bool</type> - </term> - <listitem> - <para> - This hack should only be enabled to work around "Cannot redeclare class" - errors. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.blacklist-filename"> - <term> - <parameter>opcache.blacklist_filename</parameter> - <type>string</type> - </term> - <listitem> - <para> - The location of the OPcache blacklist file. A blacklist file is a text - file containing the names of files that should not be accelerated, one - per line. Wildcards are allowed, and prefixes can also be provided. - Lines starting with a semi-colon are ignored as comments. - </para> - <para> - A simple blacklist file might look as follows: - </para> - <informalexample> - <programlisting> + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.revalidate-freq"> + <term> + <parameter>opcache.revalidate_freq</parameter> + <type>int</type> + </term> + <listitem> + <para> + How often to check script timestamps for updates, in seconds. + <literal>0</literal> will result in OPcache checking for updates on + every request. + </para> + <para> + This configuration directive is ignored if + <link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link> + is disabled. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.revalidate-path"> + <term> + <parameter>opcache.revalidate_path</parameter> + <type>bool</type> + </term> + <listitem> + <para> + If disabled, existing cached files using the same + <link linkend="ini.include-path">include_path</link> will be reused. + Thus, if a file with the same name is elsewhere in the include_path, it + won't be found. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.save-comments"> + <term> + <parameter>opcache.save_comments</parameter> + <type>bool</type> + </term> + <listitem> + <para> + If disabled, all documentation comments will be discarded from the + opcode cache to reduce the size of the optimised code. Disabling this + configuration directive may break applications and frameworks that rely + on comment parsing for annotations, including Doctrine, Zend Framework 2 + and PHPUnit. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.fast-shutdown"> + <term> + <parameter>opcache.fast_shutdown</parameter> + <type>bool</type> + </term> + <listitem> + <para> + If enabled, a fast shutdown sequence is used that doesn't free each + allocated block, but relies on the Zend Engine memory manager to + deallocate the entire set of request variables en masse. + </para> + <para> + This directive has been removed in PHP 7.2.0. A variant of the fast + shutdown sequence has been integrated into PHP and will be automatically + used if possible. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.enable-file-override"> + <term> + <parameter>opcache.enable_file_override</parameter> + <type>bool</type> + </term> + <listitem> + <para> + When enabled, the opcode cache will be checked for whether a file has + already been cached when <function>file_exists</function>, + <function>is_file</function> and <function>is_readable</function> are + called. This may increase performance in applications that check the + existence and readability of PHP scripts, but risks returning stale data + if + <link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link> + is disabled. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.optimization-level"> + <term> + <parameter>opcache.optimization_level</parameter> + <type>int</type> + </term> + <listitem> + <para> + A bitmask that controls which optimisation passes are executed. + The default is to apply all safe optimizations. + Changing the default is mostly useful for debugging/developing the optimizer + (see also <link linkend="ini.opcache.opt_debug_level">opcache.opt_debug_level</link>). + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.inherited-hack"> + <term> + <parameter>opcache.inherited_hack</parameter> + <type>bool</type> + </term> + <listitem> + <para> + This configuration directive is ignored. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.dups-fix"> + <term> + <parameter>opcache.dups_fix</parameter> + <type>bool</type> + </term> + <listitem> + <para> + This hack should only be enabled to work around "Cannot redeclare class" + errors. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.blacklist-filename"> + <term> + <parameter>opcache.blacklist_filename</parameter> + <type>string</type> + </term> + <listitem> + <para> + The location of the OPcache blacklist file. A blacklist file is a text + file containing the names of files that should not be accelerated, one + per line. Wildcards are allowed, and prefixes can also be provided. + Lines starting with a semi-colon are ignored as comments. + </para> + <para> + A simple blacklist file might look as follows: + </para> + <informalexample> + <programlisting> <![CDATA[ ; Matches a specific file. /var/www/broken.php @@ -646,644 +644,642 @@ ; A wildcard match. /var/www/*-broken.php ]]> - </programlisting> - </informalexample> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.max-file-size"> - <term> - <parameter>opcache.max_file_size</parameter> - <type>int</type> - </term> - <listitem> - <para> - The maximum file size that will be cached, in bytes. If this is - <literal>0</literal>, all files will be cached. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.consistency-checks"> - <term> - <parameter>opcache.consistency_checks</parameter> - <type>int</type> - </term> - <listitem> - <para> - If non-zero, OPcache will verify the cache checksum every N requests, - where N is the value of this configuration directive. This should only - be enabled when debugging, as it will impair performance. - </para> - <note> - <para> - Disabled as of 8.1.18 and 8.2.5. Removed as of PHP 8.3.0. - </para> - </note> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.force-restart-timeout"> - <term> - <parameter>opcache.force_restart_timeout</parameter> - <type>int</type> - </term> - <listitem> - <para> - The length of time to wait for a scheduled restart to begin if the cache - isn't active, in seconds. If the timeout is hit, then OPcache assumes - that something is wrong and will kill the processes holding locks on the - cache to permit a restart. - </para> - <para> - If - <link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link> - is set to 2 or above, a warning will be recorded in the error log when - this occurs. - </para> - <para> - This directive is not supported on Windows. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.error-log"> - <term> - <parameter>opcache.error_log</parameter> - <type>string</type> - </term> - <listitem> - <para> - The error log for OPcache errors. An empty string is treated the same as - <literal>stderr</literal>, and will result in logs being sent to - standard error (which will be the Web server error log in most cases). - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.log-verbosity-level"> - <term> - <parameter>opcache.log_verbosity_level</parameter> - <type>int</type> - </term> - <listitem> - <para> - The log verbosity level. By default, only fatal errors (level 0) and - errors (level 1) are logged. Other levels available are warnings (level - 2), information messages (level 3) and debug messages (level 4). - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.record-warnings"> - <term> - <parameter>opcache.record_warnings</parameter> - <type>bool</type> - </term> - <listitem> - <para> - If enabled, OPcache will record compile-time warnings and replay them on - the next include, even if it is served from cache. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.preferred-memory-model"> - <term> - <parameter>opcache.preferred_memory_model</parameter> - <type>string</type> - </term> - <listitem> - <para> - The preferred memory model for OPcache to use. If left empty, OPcache - will choose the most appropriate model, which is the correct behaviour - in virtually all cases. - </para> - <para> - Possible values include <literal>mmap</literal>, <literal>shm</literal>, - <literal>posix</literal> and <literal>win32</literal>. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.protect-memory"> - <term> - <parameter>opcache.protect_memory</parameter> - <type>bool</type> - </term> - <listitem> - <para> - Protects shared memory from unexpected writes while executing scripts. - This is useful for internal debugging only. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.mmap-base"> - <term> - <parameter>opcache.mmap_base</parameter> - <type>string</type> - </term> - <listitem> - <para> - The base used for shared memory segments on Windows. All PHP processes - have to map shared memory into the same address space. Using this - directive allows "Unable to reattach to base address" errors to be - fixed. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.restrict-api"> - <term> - <parameter>opcache.restrict_api</parameter> - <type>string</type> - </term> - <listitem> - <para> - Allows calling OPcache API functions only from PHP scripts which path - is started from specified string. The default <literal>""</literal> - means no restriction. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.file_update_protection"> - <term> - <parameter>opcache.file_update_protection</parameter> - <type>string</type> - </term> - <listitem> - <para> - Prevents caching files that are less than this number of seconds old. - It protects from caching of incompletely updated files. In case all file - updates are atomic, performance can be increased by setting this to <literal>0</literal>. - This will allow files to be cached immediately. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.huge_code_pages"> - <term> - <parameter>opcache.huge_code_pages</parameter> - <type>bool</type> - </term> - <listitem> - <para> - Enables or disables copying of PHP code (text segment) into HUGE PAGES. - This should improve performance, but requires appropriate OS configuration. - Available on Linux as of PHP 7.0.0, and on FreeBSD as of PHP 7.4.0. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.lockfile_path"> - <term> - <parameter>opcache.lockfile_path</parameter> - <type>string</type> - </term> - <listitem> - <para> - Absolute path used to store shared lockfiles (for *nix only) - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.opt_debug_level"> - <term> - <parameter>opcache.opt_debug_level</parameter> - <type>string</type> - </term> - <listitem> - <para> - Produces opcode dumps for debugging different stages of optimizations. - 0x10000 will output opcodes as the compiler produced them before any optimization occurs - while 0x20000 will output optimized codes. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.file-cache"> - <term> - <parameter>opcache.file_cache</parameter> - <type>string</type> - </term> - <listitem> - <para> - Enables and sets the second level cache directory. It should improve - performance when SHM memory is full, at server restart or SHM reset. The - default <literal>""</literal> disables file based caching. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.file-cache-only"> - <term> - <parameter>opcache.file_cache_only</parameter> - <type>bool</type> - </term> - <listitem> - <para> - Enables or disables opcode caching in shared memory. - </para> - <note> - <para> - Prior to PHP 8.1.0, disabling this directive with an already populated - file cache required to manually clear the file cache. - </para> - </note> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.file-cache-consistency-checks"> - <term> - <parameter>opcache.file_cache_consistency_checks</parameter> - <type>bool</type> - </term> - <listitem> - <para> - Enables or disables checksum validation when script loaded from file cache. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.file-cache-fallback"> - <term> - <parameter>opcache.file_cache_fallback</parameter> - <type>bool</type> - </term> - <listitem> - <para> - Implies <code>opcache.file_cache_only=1</code> for a certain process that - failed to reattach to shared memory (Windows only). Explicitly enabling - the file cache is required. - </para> - <caution> - <simpara> - Disabling this configuration option may prevent processes to start, - and is therefore discouraged. - </simpara> - </caution> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.validate-permission"> - <term> - <parameter>opcache.validate_permission</parameter> - <type>bool</type> - </term> - <listitem> - <para> - Validates the cached file permissions against the current user. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.validate-root"> - <term> - <parameter>opcache.validate_root</parameter> - <type>bool</type> - </term> - <listitem> - <para> - Prevents name collisions in chroot'ed environments. This should be enabled in - all chroot'ed environments to prevent access to files outside the chroot. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.preload"> - <term> - <parameter>opcache.preload</parameter> - <type>string</type> - </term> - <listitem> - <para> - Specifies a PHP script that is going to be compiled and executed at server start-up, - and which may preload other files, either by <function>include</function>ing them or by - using the <function>opcache_compile_file</function> function. All the entities (e.g. - functions and classes) defined in these files will be available to requests out of - the box, until the server is shut down. - </para> - <note> - <para> - Preloading is not supported on Windows. - </para> - </note> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.preload-user"> - <term> - <parameter>opcache.preload_user</parameter> - <type>string</type> - </term> - <listitem> - <para> - Lets the preloading to be run as the specified system user. This is useful for servers that - startup as root before switching to an unprivileged system user. Preloading as root is not - allowed by default for security reasons, unless this directive is explicitly set to - <literal>root</literal>. - As of PHP 8.3.0, this directive does not need to be set in order to allow preloading while - running as root when using the &cli.sapi; or <link linkend="book.phpdbg">phpdbg SAPI</link>. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.cache-id"> - <term> - <parameter>opcache.cache_id</parameter> - <type>string</type> - </term> - <listitem> - <para> - On Windows, all processes running the same <acronym>PHP</acronym> <acronym>SAPI</acronym> - under the same user account having the same cache ID share a single OPcache instance. - The value of the cache ID can be freely chosen. - </para> - <tip> - <simpara> - For IIS, different application pools can have their own OPcache instance - by using the environment variable <envar>APP_POOL_ID</envar> as - <parameter>opcache.cache_id</parameter>. - </simpara> - </tip> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit"> - <term> - <parameter>opcache.jit</parameter> - <type class="union"><type>string</type><type>int</type></type> - </term> - <listitem> - <para> - For typical usage, this option accepts one of four string values: - </para> - <simplelist> - <member><literal>disable</literal>: Completely disabled, cannot be enabled at runtime.</member> - <member><literal>off</literal>: Disabled, but can be enabled at runtime.</member> - <member> - <literal>tracing</literal>/<literal>on</literal>: Use tracing JIT. - Enabled by default and recommended for most users. - </member> - <member><literal>function</literal>: Use function JIT.</member> - </simplelist> - <para> - For advanced usage, this option accepts a 4-digit integer <literal>CRTO</literal>, where the digits mean: - <variablelist> - <varlistentry> - <term><literal>C</literal> (CPU-specific optimization flags)</term> - <listitem> - <simplelist> - <member><literal>0</literal>: Disable CPU-specific optimization.</member> - <member><literal>1</literal>: Enable use of AVX, if the CPU supports it.</member> - </simplelist> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>R</literal> (register allocation)</term> - <listitem> - <simplelist> - <member><literal>0</literal>: Don't perform register allocation.</member> - <member><literal>1</literal>: Perform block-local register allocation.</member> - <member><literal>2</literal>: Perform global register allocation.</member> - </simplelist> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>T</literal> (trigger)</term> - <listitem> - <simplelist> - <member><literal>0</literal>: Compile all functions on script load.</member> - <member><literal>1</literal>: Compile functions on first execution.</member> - <member> - <literal>2</literal>: Profile functions on first request and compile - the hottest functions afterwards. - </member> - <member><literal>3</literal>: Profile on the fly and compile hot functions.</member> - <member><literal>4</literal>: Currently unused.</member> - <member> - <literal>5</literal>: Use tracing JIT. Profile on the fly and - compile traces for hot code segments. - </member> - </simplelist> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>O</literal> (optimization level)</term> - <listitem> - <simplelist> - <member><literal>0</literal>: No JIT.</member> - <member><literal>1</literal>: Minimal JIT (call standard VM handlers).</member> - <member><literal>2</literal>: Inline VM handlers.</member> - <member><literal>3</literal>: Use type inference.</member> - <member><literal>4</literal>: Use call graph.</member> - <member><literal>5</literal>: Optimize whole script.</member> - </simplelist> - </listitem> - </varlistentry> - </variablelist> - The <literal>"tracing"</literal> mode corresponds to <code>CRTO = 1254</code>, - the <literal>"function"</literal> mode corresponds to <code>CRTO = 1205</code>. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-buffer-size"> - <term> - <parameter>opcache.jit_buffer_size</parameter> - <type>int</type> - </term> - <listitem> - <para> - The amount of shared memory to reserve for compiled JIT code. A zero value disables the JIT. - </para> - &ini.shorthandbytes; - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-debug"> - <term> - <parameter>opcache.jit_debug</parameter> - <type>int</type> - </term> - <listitem> - <para> - A bit mask specifying which JIT debug output to enable. - For possible values, please consult - <link xlink:href="&url.php.git.src.master.view;ext/opcache/jit/zend_jit.h">zend_jit.h</link> - (search for macro definitions beginning with <code>ZEND_JIT_DEBUG</code>). - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-bisect-limit"> - <term> - <parameter>opcache.jit_bisect_limit</parameter> - <type>int</type> - </term> - <listitem> - <para> - Debugging option that disables JIT compilation after compiling a certain number of functions. - This may be helpful to bisect the source of a JIT miscompilation. Note: this option only works - when JIT trigger is set to 0 (compile on script load) or 1 (compile on first execution), - e.g. <code>opcache.jit=1215</code>. See more in <link linkend="ini.opcache.jit">opcache.jit</link> option. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-prof-threshold"> - <term> - <parameter>opcache.jit_prof_threshold</parameter> - <type>float</type> - </term> - <listitem> - <para> - When using the "profile on first request" trigger mode, this threshold determines whether a - function is considered hot. The number of calls to the function divided by the number of calls - to all functions must be above the threshold. For example, a threshold of 0.005 means that - functions that made up more than 0.5% of all calls will be JIT compiled. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-max-root-traces"> - <term> - <parameter>opcache.jit_max_root_traces</parameter> - <type>int</type> - </term> - <listitem> - <para> - Maximum number of root traces. The root trace is an execution flow taking one path through the code firstly, - which is a unit of JIT compilation. JIT will not compile new code if it reaches this limit. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-max-side-traces"> - <term> - <parameter>opcache.jit_max_side_traces</parameter> - <type>int</type> - </term> - <listitem> - <para> - Maximum number of side traces a root trace may have. The side trace is another execution flow that does not - follow the path of compiled root trace. Side traces belonging to the same root trace will not be compiled - if it reaches this limit. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-max-exit-counters"> - <term> - <parameter>opcache.jit_max_exit_counters</parameter> - <type>int</type> - </term> - <listitem> - <para> - Maximum number of side trace exit counters. This limits the total number of side traces - there may be, across all root traces. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-hot-loop"> - <term> - <parameter>opcache.jit_hot_loop</parameter> - <type>int</type> - </term> - <listitem> - <para> - After how many iterations a loop is considered hot. - Valid value range is <code>[0,255]</code>; for any setting out of this range, - e.g. <literal>-1</literal> or <literal>256</literal>, default value will be - used instead. <literal>0</literal> will disable JIT to trace and compile any loops. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-hot-func"> - <term> - <parameter>opcache.jit_hot_func</parameter> - <type>int</type> - </term> - <listitem> - <para> - After how many calls a function is considered hot. - Valid value range is <code>[0,255]</code>; for any setting out of this range, - e.g. <literal>-1</literal> or <literal>256</literal>, default value will be - used instead. <literal>0</literal> will disable JIT to trace and compile any functions. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-hot-return"> - <term> - <parameter>opcache.jit_hot_return</parameter> - <type>int</type> - </term> - <listitem> - <para> - After how many returns a return is considered hot. - Valid value range is <code>[0,255]</code>; for any setting out of this range, - e.g. <literal>-1</literal> or <literal>256</literal>, default value will be - used instead. <literal>0</literal> will disable JIT to trace and compile any returns. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-hot-side-exit"> - <term> - <parameter>opcache.jit_hot_side_exit</parameter> - <type>int</type> - </term> - <listitem> - <para> - After how many exits a side exit is considered hot. - Valid value range is <code>[0,255]</code>; for any setting out of this range, - e.g. <literal>-1</literal> or <literal>256</literal>, default value will be - used instead. <literal>0</literal> will disable JIT to trace and compile any side exits. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-blacklist-root-trace"> - <term> - <parameter>opcache.jit_blacklist_root_trace</parameter> - <type>int</type> - </term> - <listitem> - <para> - Maximum number of times the compilation of a root trace is attempted before it is blacklisted. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-blacklist-side-trace"> - <term> - <parameter>opcache.jit_blacklist_side_trace</parameter> - <type>int</type> - </term> - <listitem> - <para> - Maximum number of times the compilation of a side trace is attempted before it is blacklisted. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-max-loop-unrolls"> - <term> - <parameter>opcache.jit_max_loop_unrolls</parameter> - <type>int</type> - </term> - <listitem> - <para> - Maximum number of attempts to unroll a loop in a side trace, - trying to reach the root trace and close the outer loop. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-max-recursive-calls"> - <term> - <parameter>opcache.jit_max_recursive_calls</parameter> - <type>int</type> - </term> - <listitem> - <para> - Maximum number of unrolled recursive call loops. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-max-recursive-return"> - <term> - <parameter>opcache.jit_max_recursive_returns</parameter> - <type>int</type> - </term> - <listitem> - <para> - Maximum number of unrolled recursive return loops. - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="ini.opcache.jit-max-polymorphic-calls"> - <term> - <parameter>opcache.jit_max_polymorphic_calls</parameter> - <type>int</type> - </term> - <listitem> - <para> - Maximum number of attempts to inline polymorphic (dynamic or method) calls. - Calls above this limit are treated as megamorphic and are not inlined. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + </programlisting> + </informalexample> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.max-file-size"> + <term> + <parameter>opcache.max_file_size</parameter> + <type>int</type> + </term> + <listitem> + <para> + The maximum file size that will be cached, in bytes. If this is + <literal>0</literal>, all files will be cached. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.consistency-checks"> + <term> + <parameter>opcache.consistency_checks</parameter> + <type>int</type> + </term> + <listitem> + <para> + If non-zero, OPcache will verify the cache checksum every N requests, + where N is the value of this configuration directive. This should only + be enabled when debugging, as it will impair performance. + </para> + <note> + <para> + Disabled as of 8.1.18 and 8.2.5. Removed as of PHP 8.3.0. + </para> + </note> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.force-restart-timeout"> + <term> + <parameter>opcache.force_restart_timeout</parameter> + <type>int</type> + </term> + <listitem> + <para> + The length of time to wait for a scheduled restart to begin if the cache + isn't active, in seconds. If the timeout is hit, then OPcache assumes + that something is wrong and will kill the processes holding locks on the + cache to permit a restart. + </para> + <para> + If + <link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link> + is set to 2 or above, a warning will be recorded in the error log when + this occurs. + </para> + <para> + This directive is not supported on Windows. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.error-log"> + <term> + <parameter>opcache.error_log</parameter> + <type>string</type> + </term> + <listitem> + <para> + The error log for OPcache errors. An empty string is treated the same as + <literal>stderr</literal>, and will result in logs being sent to + standard error (which will be the Web server error log in most cases). + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.log-verbosity-level"> + <term> + <parameter>opcache.log_verbosity_level</parameter> + <type>int</type> + </term> + <listitem> + <para> + The log verbosity level. By default, only fatal errors (level 0) and + errors (level 1) are logged. Other levels available are warnings (level + 2), information messages (level 3) and debug messages (level 4). + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.record-warnings"> + <term> + <parameter>opcache.record_warnings</parameter> + <type>bool</type> + </term> + <listitem> + <para> + If enabled, OPcache will record compile-time warnings and replay them on + the next include, even if it is served from cache. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.preferred-memory-model"> + <term> + <parameter>opcache.preferred_memory_model</parameter> + <type>string</type> + </term> + <listitem> + <para> + The preferred memory model for OPcache to use. If left empty, OPcache + will choose the most appropriate model, which is the correct behaviour + in virtually all cases. + </para> + <para> + Possible values include <literal>mmap</literal>, <literal>shm</literal>, + <literal>posix</literal> and <literal>win32</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.protect-memory"> + <term> + <parameter>opcache.protect_memory</parameter> + <type>bool</type> + </term> + <listitem> + <para> + Protects shared memory from unexpected writes while executing scripts. + This is useful for internal debugging only. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.mmap-base"> + <term> + <parameter>opcache.mmap_base</parameter> + <type>string</type> + </term> + <listitem> + <para> + The base used for shared memory segments on Windows. All PHP processes + have to map shared memory into the same address space. Using this + directive allows "Unable to reattach to base address" errors to be + fixed. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.restrict-api"> + <term> + <parameter>opcache.restrict_api</parameter> + <type>string</type> + </term> + <listitem> + <para> + Allows calling OPcache API functions only from PHP scripts which path + is started from specified string. The default <literal>""</literal> + means no restriction. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.file_update_protection"> + <term> + <parameter>opcache.file_update_protection</parameter> + <type>string</type> + </term> + <listitem> + <para> + Prevents caching files that are less than this number of seconds old. + It protects from caching of incompletely updated files. In case all file + updates are atomic, performance can be increased by setting this to <literal>0</literal>. + This will allow files to be cached immediately. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.huge_code_pages"> + <term> + <parameter>opcache.huge_code_pages</parameter> + <type>bool</type> + </term> + <listitem> + <para> + Enables or disables copying of PHP code (text segment) into HUGE PAGES. + This should improve performance, but requires appropriate OS configuration. + Available on Linux as of PHP 7.0.0, and on FreeBSD as of PHP 7.4.0. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.lockfile_path"> + <term> + <parameter>opcache.lockfile_path</parameter> + <type>string</type> + </term> + <listitem> + <para> + Absolute path used to store shared lockfiles (for *nix only) + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.opt_debug_level"> + <term> + <parameter>opcache.opt_debug_level</parameter> + <type>string</type> + </term> + <listitem> + <para> + Produces opcode dumps for debugging different stages of optimizations. + 0x10000 will output opcodes as the compiler produced them before any optimization occurs + while 0x20000 will output optimized codes. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.file-cache"> + <term> + <parameter>opcache.file_cache</parameter> + <type>string</type> + </term> + <listitem> + <para> + Enables and sets the second level cache directory. It should improve + performance when SHM memory is full, at server restart or SHM reset. The + default <literal>""</literal> disables file based caching. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.file-cache-only"> + <term> + <parameter>opcache.file_cache_only</parameter> + <type>bool</type> + </term> + <listitem> + <para> + Enables or disables opcode caching in shared memory. + </para> + <note> + <para> + Prior to PHP 8.1.0, disabling this directive with an already populated + file cache required to manually clear the file cache. + </para> + </note> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.file-cache-consistency-checks"> + <term> + <parameter>opcache.file_cache_consistency_checks</parameter> + <type>bool</type> + </term> + <listitem> + <para> + Enables or disables checksum validation when script loaded from file cache. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.file-cache-fallback"> + <term> + <parameter>opcache.file_cache_fallback</parameter> + <type>bool</type> + </term> + <listitem> + <para> + Implies <code>opcache.file_cache_only=1</code> for a certain process that + failed to reattach to shared memory (Windows only). Explicitly enabling + the file cache is required. + </para> + <caution> + <simpara> + Disabling this configuration option may prevent processes to start, + and is therefore discouraged. + </simpara> + </caution> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.validate-permission"> + <term> + <parameter>opcache.validate_permission</parameter> + <type>bool</type> + </term> + <listitem> + <para> + Validates the cached file permissions against the current user. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.validate-root"> + <term> + <parameter>opcache.validate_root</parameter> + <type>bool</type> + </term> + <listitem> + <para> + Prevents name collisions in chroot'ed environments. This should be enabled in + all chroot'ed environments to prevent access to files outside the chroot. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.preload"> + <term> + <parameter>opcache.preload</parameter> + <type>string</type> + </term> + <listitem> + <para> + Specifies a PHP script that is going to be compiled and executed at server start-up, + and which may preload other files, either by <function>include</function>ing them or by + using the <function>opcache_compile_file</function> function. All the entities (e.g. + functions and classes) defined in these files will be available to requests out of + the box, until the server is shut down. + </para> + <note> + <para> + Preloading is not supported on Windows. + </para> + </note> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.preload-user"> + <term> + <parameter>opcache.preload_user</parameter> + <type>string</type> + </term> + <listitem> + <para> + Lets the preloading to be run as the specified system user. This is useful for servers that + startup as root before switching to an unprivileged system user. Preloading as root is not + allowed by default for security reasons, unless this directive is explicitly set to + <literal>root</literal>. + As of PHP 8.3.0, this directive does not need to be set in order to allow preloading while + running as root when using the &cli.sapi; or <link linkend="book.phpdbg">phpdbg SAPI</link>. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.cache-id"> + <term> + <parameter>opcache.cache_id</parameter> + <type>string</type> + </term> + <listitem> + <para> + On Windows, all processes running the same <acronym>PHP</acronym> <acronym>SAPI</acronym> + under the same user account having the same cache ID share a single OPcache instance. + The value of the cache ID can be freely chosen. + </para> + <tip> + <simpara> + For IIS, different application pools can have their own OPcache instance + by using the environment variable <envar>APP_POOL_ID</envar> as + <parameter>opcache.cache_id</parameter>. + </simpara> + </tip> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit"> + <term> + <parameter>opcache.jit</parameter> + <type class="union"><type>string</type><type>int</type></type> + </term> + <listitem> + <para> + For typical usage, this option accepts one of four string values: + </para> + <simplelist> + <member><literal>disable</literal>: Completely disabled, cannot be enabled at runtime.</member> + <member><literal>off</literal>: Disabled, but can be enabled at runtime.</member> + <member> + <literal>tracing</literal>/<literal>on</literal>: Use tracing JIT. + Enabled by default and recommended for most users. + </member> + <member><literal>function</literal>: Use function JIT.</member> + </simplelist> + <para> + For advanced usage, this option accepts a 4-digit integer <literal>CRTO</literal>, where the digits mean: + <variablelist> + <varlistentry> + <term><literal>C</literal> (CPU-specific optimization flags)</term> + <listitem> + <simplelist> + <member><literal>0</literal>: Disable CPU-specific optimization.</member> + <member><literal>1</literal>: Enable use of AVX, if the CPU supports it.</member> + </simplelist> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>R</literal> (register allocation)</term> + <listitem> + <simplelist> + <member><literal>0</literal>: Don't perform register allocation.</member> + <member><literal>1</literal>: Perform block-local register allocation.</member> + <member><literal>2</literal>: Perform global register allocation.</member> + </simplelist> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>T</literal> (trigger)</term> + <listitem> + <simplelist> + <member><literal>0</literal>: Compile all functions on script load.</member> + <member><literal>1</literal>: Compile functions on first execution.</member> + <member> + <literal>2</literal>: Profile functions on first request and compile + the hottest functions afterwards. + </member> + <member><literal>3</literal>: Profile on the fly and compile hot functions.</member> + <member><literal>4</literal>: Currently unused.</member> + <member> + <literal>5</literal>: Use tracing JIT. Profile on the fly and + compile traces for hot code segments. + </member> + </simplelist> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>O</literal> (optimization level)</term> + <listitem> + <simplelist> + <member><literal>0</literal>: No JIT.</member> + <member><literal>1</literal>: Minimal JIT (call standard VM handlers).</member> + <member><literal>2</literal>: Inline VM handlers.</member> + <member><literal>3</literal>: Use type inference.</member> + <member><literal>4</literal>: Use call graph.</member> + <member><literal>5</literal>: Optimize whole script.</member> + </simplelist> + </listitem> + </varlistentry> + </variablelist> + The <literal>"tracing"</literal> mode corresponds to <code>CRTO = 1254</code>, + the <literal>"function"</literal> mode corresponds to <code>CRTO = 1205</code>. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-buffer-size"> + <term> + <parameter>opcache.jit_buffer_size</parameter> + <type>int</type> + </term> + <listitem> + <para> + The amount of shared memory to reserve for compiled JIT code. A zero value disables the JIT. + </para> + &ini.shorthandbytes; + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-debug"> + <term> + <parameter>opcache.jit_debug</parameter> + <type>int</type> + </term> + <listitem> + <para> + A bit mask specifying which JIT debug output to enable. + For possible values, please consult + <link xlink:href="&url.php.git.src.master.view;ext/opcache/jit/zend_jit.h">zend_jit.h</link> + (search for macro definitions beginning with <code>ZEND_JIT_DEBUG</code>). + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-bisect-limit"> + <term> + <parameter>opcache.jit_bisect_limit</parameter> + <type>int</type> + </term> + <listitem> + <para> + Debugging option that disables JIT compilation after compiling a certain number of functions. + This may be helpful to bisect the source of a JIT miscompilation. Note: this option only works + when JIT trigger is set to 0 (compile on script load) or 1 (compile on first execution), + e.g. <code>opcache.jit=1215</code>. See more in <link linkend="ini.opcache.jit">opcache.jit</link> option. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-prof-threshold"> + <term> + <parameter>opcache.jit_prof_threshold</parameter> + <type>float</type> + </term> + <listitem> + <para> + When using the "profile on first request" trigger mode, this threshold determines whether a + function is considered hot. The number of calls to the function divided by the number of calls + to all functions must be above the threshold. For example, a threshold of 0.005 means that + functions that made up more than 0.5% of all calls will be JIT compiled. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-max-root-traces"> + <term> + <parameter>opcache.jit_max_root_traces</parameter> + <type>int</type> + </term> + <listitem> + <para> + Maximum number of root traces. The root trace is an execution flow taking one path through the code firstly, + which is a unit of JIT compilation. JIT will not compile new code if it reaches this limit. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-max-side-traces"> + <term> + <parameter>opcache.jit_max_side_traces</parameter> + <type>int</type> + </term> + <listitem> + <para> + Maximum number of side traces a root trace may have. The side trace is another execution flow that does not + follow the path of compiled root trace. Side traces belonging to the same root trace will not be compiled + if it reaches this limit. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-max-exit-counters"> + <term> + <parameter>opcache.jit_max_exit_counters</parameter> + <type>int</type> + </term> + <listitem> + <para> + Maximum number of side trace exit counters. This limits the total number of side traces + there may be, across all root traces. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-hot-loop"> + <term> + <parameter>opcache.jit_hot_loop</parameter> + <type>int</type> + </term> + <listitem> + <para> + After how many iterations a loop is considered hot. + Valid value range is <code>[0,255]</code>; for any setting out of this range, + e.g. <literal>-1</literal> or <literal>256</literal>, default value will be + used instead. <literal>0</literal> will disable JIT to trace and compile any loops. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-hot-func"> + <term> + <parameter>opcache.jit_hot_func</parameter> + <type>int</type> + </term> + <listitem> + <para> + After how many calls a function is considered hot. + Valid value range is <code>[0,255]</code>; for any setting out of this range, + e.g. <literal>-1</literal> or <literal>256</literal>, default value will be + used instead. <literal>0</literal> will disable JIT to trace and compile any functions. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-hot-return"> + <term> + <parameter>opcache.jit_hot_return</parameter> + <type>int</type> + </term> + <listitem> + <para> + After how many returns a return is considered hot. + Valid value range is <code>[0,255]</code>; for any setting out of this range, + e.g. <literal>-1</literal> or <literal>256</literal>, default value will be + used instead. <literal>0</literal> will disable JIT to trace and compile any returns. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-hot-side-exit"> + <term> + <parameter>opcache.jit_hot_side_exit</parameter> + <type>int</type> + </term> + <listitem> + <para> + After how many exits a side exit is considered hot. + Valid value range is <code>[0,255]</code>; for any setting out of this range, + e.g. <literal>-1</literal> or <literal>256</literal>, default value will be + used instead. <literal>0</literal> will disable JIT to trace and compile any side exits. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-blacklist-root-trace"> + <term> + <parameter>opcache.jit_blacklist_root_trace</parameter> + <type>int</type> + </term> + <listitem> + <para> + Maximum number of times the compilation of a root trace is attempted before it is blacklisted. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-blacklist-side-trace"> + <term> + <parameter>opcache.jit_blacklist_side_trace</parameter> + <type>int</type> + </term> + <listitem> + <para> + Maximum number of times the compilation of a side trace is attempted before it is blacklisted. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-max-loop-unrolls"> + <term> + <parameter>opcache.jit_max_loop_unrolls</parameter> + <type>int</type> + </term> + <listitem> + <para> + Maximum number of attempts to unroll a loop in a side trace, + trying to reach the root trace and close the outer loop. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-max-recursive-calls"> + <term> + <parameter>opcache.jit_max_recursive_calls</parameter> + <type>int</type> + </term> + <listitem> + <para> + Maximum number of unrolled recursive call loops. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-max-recursive-return"> + <term> + <parameter>opcache.jit_max_recursive_returns</parameter> + <type>int</type> + </term> + <listitem> + <para> + Maximum number of unrolled recursive return loops. + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="ini.opcache.jit-max-polymorphic-calls"> + <term> + <parameter>opcache.jit_max_polymorphic_calls</parameter> + <type>int</type> + </term> + <listitem> + <para> + Maximum number of attempts to inline polymorphic (dynamic or method) calls. + Calls above this limit are treated as megamorphic and are not inlined. + </para> + </listitem> + </varlistentry> + </variablelist> </sect1> - <!-- Keep this comment at the end of the file Local variables: mode: sgml

« previous php.doc.cvs (#22984) next »