1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415
|
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<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
-->
|