php-doc-en/reference/info/constants.xml
Torben Wilson af4410a7e1 Normalized the sgml-default-dtd-file local-variable line for those
still using this, after discussion on the phpdoc list.
From now on, manual.ced will need to be found at ~/.phpdoc/manual.ced.



git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288721 c90b9560-bf6c-de11-be94-00142212c4b1
2009-09-25 07:04:39 +00:00

415 lines
12 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $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>
<entry><constant>CREDITS_GROUP</constant></entry>
<entry>1</entry>
<entry>A list of the core developers</entry>
</row>
<row>
<entry><constant>CREDITS_GENERAL</constant></entry>
<entry>2</entry>
<entry>
General credits: Language design and concept, PHP
authors and SAPI module.
</entry>
</row>
<row>
<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>
<entry><constant>CREDITS_MODULES</constant></entry>
<entry>8</entry>
<entry>
A list of the extension modules for PHP, and their authors.
</entry>
</row>
<row>
<entry><constant>CREDITS_DOCS</constant></entry>
<entry>16</entry>
<entry>
The credits for the documentation team.
</entry>
</row>
<row>
<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>
<entry><constant>CREDITS_QA</constant></entry>
<entry>64</entry>
<entry>
The credits for the quality assurance team.
</entry>
</row>
<row>
<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>
<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>
<entry><constant>INFO_CREDITS</constant></entry>
<entry>2</entry>
<entry>
PHP Credits. See also <function>phpcredits</function>.
</entry>
</row>
<row>
<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>
<entry><constant>INFO_MODULES</constant></entry>
<entry>8</entry>
<entry>
Loaded modules and their respective settings.
</entry>
</row>
<row>
<entry><constant>INFO_ENVIRONMENT</constant></entry>
<entry>16</entry>
<entry>
Environment Variable information that's also available in
<varname>$_ENV</varname>.
</entry>
</row>
<row>
<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>
<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>
<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>
<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>
<entry><constant>ASSERT_ACTIVE</constant></entry>
<entry>assert.active</entry>
<entry>
Enable <function>assert</function> evaluation.
</entry>
</row>
<row>
<entry><constant>ASSERT_CALLBACK</constant></entry>
<entry>assert.callback</entry>
<entry>
Callback to call on failed assertions.
</entry>
</row>
<row>
<entry><constant>ASSERT_BAIL</constant></entry>
<entry>assert.bail</entry>
<entry>
Terminate execution on failed assertions.
</entry>
</row>
<row>
<entry><constant>ASSERT_WARNING</constant></entry>
<entry>assert.warning</entry>
<entry>
Issues a PHP warning for each failed assertion
</entry>
</row>
<row>
<entry><constant>ASSERT_QUITE_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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<entry><constant>PHP_WINDOWS_NT_DOMAIN_CONTROLLER</constant></entry>
<entry>This is a domain controller</entry>
</row>
<row>
<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>
<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
-->