php-doc-en/reference/info/constants.xml
2012-03-24 18:26:02 +00:00

450 lines
14 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<appendix xml:id="info.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.constants;
&extension.constants.core;
<table>
<title>Pre-defined <function>phpcredits</function> constants</title>
<tgroup cols="3">
<thead>
<row>
<entry>Constant</entry>
<entry>Value</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row xml:id="constant.credits-group">
<entry><constant>CREDITS_GROUP</constant></entry>
<entry>1</entry>
<entry>A list of the core developers</entry>
</row>
<row xml:id="constant.credits-general">
<entry><constant>CREDITS_GENERAL</constant></entry>
<entry>2</entry>
<entry>
General credits: Language design and concept, PHP
authors and SAPI module.
</entry>
</row>
<row xml:id="constant.credits-sapi">
<entry><constant>CREDITS_SAPI</constant></entry>
<entry>4</entry>
<entry>
A list of the server API modules for PHP, and their authors.
</entry>
</row>
<row xml:id="constant.credits-modules">
<entry><constant>CREDITS_MODULES</constant></entry>
<entry>8</entry>
<entry>
A list of the extension modules for PHP, and their authors.
</entry>
</row>
<row xml:id="constant.credits-docs">
<entry><constant>CREDITS_DOCS</constant></entry>
<entry>16</entry>
<entry>
The credits for the documentation team.
</entry>
</row>
<row xml:id="constant.credits-fullpage">
<entry><constant>CREDITS_FULLPAGE</constant></entry>
<entry>32</entry>
<entry>
Usually used in combination with the other flags. Indicates
that a complete stand-alone HTML page needs to be
printed including the information indicated by the other
flags.
</entry>
</row>
<row xml:id="constant.credits-qa">
<entry><constant>CREDITS_QA</constant></entry>
<entry>64</entry>
<entry>
The credits for the quality assurance team.
</entry>
</row>
<row xml:id="constant.credits-all">
<entry><constant>CREDITS_ALL</constant></entry>
<entry>-1</entry>
<entry>
All the credits, equivalent to using: <literal>CREDITS_DOCS +
CREDITS_GENERAL + CREDITS_GROUP + CREDITS_MODULES + CREDITS_QA
CREDITS_FULLPAGE</literal>. It generates a complete stand-alone HTML
page with the appropriate tags. This is the default value.
</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
<title><function>phpinfo</function> constants</title>
<tgroup cols="3">
<thead>
<row>
<entry>Constant</entry>
<entry>Value</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row xml:id="constant.info-general">
<entry><constant>INFO_GENERAL</constant></entry>
<entry>1</entry>
<entry>
The configuration line, &php.ini; location, build date, Web
Server, System and more.
</entry>
</row>
<row xml:id="constant.info-credits">
<entry><constant>INFO_CREDITS</constant></entry>
<entry>2</entry>
<entry>
PHP Credits. See also <function>phpcredits</function>.
</entry>
</row>
<row xml:id="constant.info-configuration">
<entry><constant>INFO_CONFIGURATION</constant></entry>
<entry>4</entry>
<entry>
Current Local and Master values for PHP directives. See
also <function>ini_get</function>.
</entry>
</row>
<row xml:id="constant.info-modules">
<entry><constant>INFO_MODULES</constant></entry>
<entry>8</entry>
<entry>
Loaded modules and their respective settings.
</entry>
</row>
<row xml:id="constant.info-environment">
<entry><constant>INFO_ENVIRONMENT</constant></entry>
<entry>16</entry>
<entry>
Environment Variable information that's also available in
<varname>$_ENV</varname>.
</entry>
</row>
<row xml:id="constant.info-variables">
<entry><constant>INFO_VARIABLES</constant></entry>
<entry>32</entry>
<entry>
Shows all <link linkend="language.variables.predefined">
predefined variables</link> from <literal>EGPCS</literal> (Environment, GET,
POST, Cookie, Server).
</entry>
</row>
<row xml:id="constant.info-license">
<entry><constant>INFO_LICENSE</constant></entry>
<entry>64</entry>
<entry>
PHP License information. See also the <link
xlink:href="&url.php.license;">license faq</link>.
</entry>
</row>
<row xml:id="constant.info-all">
<entry><constant>INFO_ALL</constant></entry>
<entry>-1</entry>
<entry>
Shows all of the above. This is the default value.
</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
<title>INI constants</title>
<tgroup cols="3">
<thead>
<row>
<entry>Constant</entry>
<entry>Value</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row xml:id="constant.ini-user">
<entry><literal>INI_USER</literal></entry>
<entry>1</entry>
<entry>Unused</entry>
</row>
<row xml:id="constant.ini-perdir">
<entry><literal>INI_PERDIR</literal></entry>
<entry>2</entry>
<entry>Unused</entry>
</row>
<row xml:id="constant.ini-system">
<entry><literal>INI_SYSTEM</literal></entry>
<entry>4</entry>
<entry>Unused</entry>
</row>
<row xml:id="constant.ini-all">
<entry><literal>INI_ALL</literal></entry>
<entry>7</entry>
<entry>Unused</entry>
</row>
</tbody>
</tgroup>
</table>
<simpara>
Assert constants, these values are used to set
the assertion options in <function>assert_options</function>.
</simpara>
<table>
<title><function>assert</function> constants</title>
<tgroup cols="3">
<thead>
<row>
<entry>Constant</entry>
<entry>INI Setting</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row xml:id="constant.assert-active">
<entry><constant>ASSERT_ACTIVE</constant></entry>
<entry>assert.active</entry>
<entry>
Enable <function>assert</function> evaluation.
</entry>
</row>
<row xml:id="constant.assert-callback">
<entry><constant>ASSERT_CALLBACK</constant></entry>
<entry>assert.callback</entry>
<entry>
Callback to call on failed assertions.
</entry>
</row>
<row xml:id="constant.assert-bail">
<entry><constant>ASSERT_BAIL</constant></entry>
<entry>assert.bail</entry>
<entry>
Terminate execution on failed assertions.
</entry>
</row>
<row xml:id="constant.assert-warning">
<entry><constant>ASSERT_WARNING</constant></entry>
<entry>assert.warning</entry>
<entry>
Issues a PHP warning for each failed assertion
</entry>
</row>
<row xml:id="constant.assert-quiet-eval">
<entry><constant>ASSERT_QUIET_EVAL</constant></entry>
<entry>assert.quiet_eval</entry>
<entry>
Disable <literal>error_reporting</literal> during assertion expression evaluation.
</entry>
</row>
</tbody>
</tgroup>
</table>
<simpara>
The following constants are only available if the host operating
system is Windows, and can tell different versioning information
so its possible to detect various features and make use of them.
They are all available as of PHP 5.3.0.
</simpara>
<table>
<title>Windows specific constants</title>
<tgroup cols="3">
<thead>
<row>
<entry>Constant</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row xml:id="constant.php-windows-version-major">
<entry><constant>PHP_WINDOWS_VERSION_MAJOR</constant></entry>
<entry>
The major version of Windows, this can be either <literal>4</literal> (NT4/Me/98/95),
<literal>5</literal> (XP/2003 R2/2003/2000) or <literal>6</literal> (Vista/2008).
</entry>
</row>
<row xml:id="constant.php-windows-version-minor">
<entry><constant>PHP_WINDOWS_VERSION_MINOR</constant></entry>
<entry>
The minor version of Windows, this can be either <literal>0</literal> (Vista/2008/2000/NT4/95),
<literal>1</literal> (XP), <literal>2</literal> (2003 R2/2003/XP x64), <literal>10</literal> (98)
or <literal>90</literal> (ME).</entry>
</row>
<row xml:id="constant.php-windows-version-build">
<entry><constant>PHP_WINDOWS_VERSION_BUILD</constant></entry>
<entry>The Windows build number (for example, Windows Vista with SP1 applied is build 6001)</entry>
</row>
<row xml:id="constant.php-windows-version-platform">
<entry><constant>PHP_WINDOWS_VERSION_PLATFORM</constant></entry>
<entry>
The platform that PHP currently is running on, this value is <literal>2</literal> on Windows
Vista/XP/2000/NT4, Server 2008/2003 and on Windows ME/98/95 this value is <literal>1</literal>.
</entry>
</row>
<row xml:id="constant.php-windows-version-sp-major">
<entry><constant>PHP_WINDOWS_VERSION_SP_MAJOR</constant></entry>
<entry>
The major version of the service pack installed, this value is <literal>0</literal>
if no service pack is installed. For example, Windows XP with service pack 3 installed
will make this value <literal>3</literal>.
</entry>
</row>
<row xml:id="constant.php-windows-version-sp-minor">
<entry><constant>PHP_WINDOWS_VERSION_SP_MINOR</constant></entry>
<entry>
The minor version of the service pack installed, this value is <literal>0</literal>
if no service pack is installed.
</entry>
</row>
<row xml:id="constant.php-windows-version-suitemask">
<entry><constant>PHP_WINDOWS_VERSION_SUITEMASK</constant></entry>
<entry>
The suitemask is a bitmask that can tell if various features of Windows is installed,
see the table below for possible bitfield values.
</entry>
</row>
<row xml:id="constant.php-windows-version-producttype">
<entry><constant>PHP_WINDOWS_VERSION_PRODUCTTYPE</constant></entry>
<entry>
This contains the value used to determine the <literal>PHP_WINDOWS_NT_*</literal>
constants. This value may be one of the <literal>PHP_WINDOWS_NT_*</literal> constants
indicating the platform type.
</entry>
</row>
<row xml:id="constant.php-windows-nt-domain-controller">
<entry><constant>PHP_WINDOWS_NT_DOMAIN_CONTROLLER</constant></entry>
<entry>This is a domain controller</entry>
</row>
<row xml:id="constant.php-windows-nt-server">
<entry><constant>PHP_WINDOWS_NT_SERVER</constant></entry>
<entry>
This is a server system (eg. Server 2008/2003/2000), note that if this is a
domain controller its reported as <constant>PHP_WINDOWS_NT_DOMAIN_CONTROLLER</constant>.
</entry>
</row>
<row xml:id="constant.php-windows-nt-workstation">
<entry><constant>PHP_WINDOWS_NT_WORKSTATION</constant></entry>
<entry>This is a workstation system (eg. Vista/XP/2000/NT4)</entry>
</row>
</tbody>
</tgroup>
</table>
<simpara>
This table shows a list of features that can be checked for using the
<constant>PHP_WINDOWS_VERSION_SUITEMASK</constant> bitmask.
</simpara>
<table>
<title>Windows suitemask bitfields</title>
<tgroup cols="3">
<thead>
<row>
<entry>Bits</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>0x00000004</literal></entry>
<entry>Microsoft BackOffice components are installed.</entry>
</row>
<row>
<entry><literal>0x00000400</literal></entry>
<entry>Windows Server 2003, Web Edition is installed.</entry>
</row>
<row>
<entry><literal>0x00004000</literal></entry>
<entry>Windows Server 2003, Compute Cluster Edition is installed.</entry>
</row>
<row>
<entry><literal>0x00000080</literal></entry>
<entry>
Windows Server 2008 Datacenter, Windows Server 2003, Datacenter Edition or
Windows 2000 Datacenter Server is installed.
</entry>
</row>
<row>
<entry><literal>0x00000002</literal></entry>
<entry>
Windows Server 2008 Enterprise, Windows Server 2003, Enterprise Edition,
Windows 2000 Advanced Server, or Windows NT Server 4.0 Enterprise Edition
is installed.
</entry>
</row>
<row>
<entry><literal>0x00000040</literal></entry>
<entry>Windows XP Embedded is installed.</entry>
</row>
<row>
<entry><literal>0x00000200</literal></entry>
<entry>
Windows Vista Home Premium, Windows Vista Home Basic, or Windows XP Home
Edition is installed.
</entry>
</row>
<row>
<entry><literal>0x00000100</literal></entry>
<entry>
Remote Desktop is supported, but only one interactive session is supported.
This value is set unless the system is running in application server mode.
</entry>
</row>
<row>
<entry><literal>0x00000001</literal></entry>
<entry>
Microsoft Small Business Server was once installed on the system, but may have
been upgraded to another version of Windows.
</entry>
</row>
<row>
<entry><literal>0x00000020</literal></entry>
<entry>
Microsoft Small Business Server is installed with the restrictive client
license in force.
</entry>
</row>
<row>
<entry><literal>0x00002000</literal></entry>
<entry>Windows Storage Server 2003 R2 or Windows Storage Server 2003 is installed.</entry>
</row>
<row>
<entry><literal>0x00000010</literal></entry>
<entry>
Terminal Services is installed. This value is always set. If this value is set but
<literal>0x00000100</literal> is not set, then the system is running in application
server mode.
</entry>
</row>
<row>
<entry><literal>0x00008000</literal></entry>
<entry>Windows Home Server is installed.</entry>
</row>
</tbody>
</tgroup>
</table>
</appendix>
<!-- 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
-->