Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 8171

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Predefined Constants</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="info.resources.html">Resource Types</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.info.html">PHP Options/Info Functions</a></div>
 <div class="up"><a href="book.info.html">PHP Options/Info</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="info.constants" class="appendix">
 <h1>Predefined Constants</h1>

 <p class="simpara">
The constants below are always available as part of the PHP core.
</p>
 <table class="doctable table">
  <caption><strong>Pre-defined  <span class="function"><a href="function.phpcredits.html" class="function">phpcredits()</a></span> constants</strong></caption>
  
   <thead>
    <tr>
     <th>Constant</th>
     <th>Value</th>
     <th>Description</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr id="constant.credits-group">
     <td><strong><code>CREDITS_GROUP</code></strong></td>
     <td>1</td>
     <td>A list of the core developers</td>
    </tr>

    <tr id="constant.credits-general">
     <td><strong><code>CREDITS_GENERAL</code></strong></td>
     <td>2</td>
     <td>
      General credits: Language design and concept, PHP
      authors and SAPI module.
     </td>
    </tr>

    <tr id="constant.credits-sapi">
     <td><strong><code>CREDITS_SAPI</code></strong></td>
     <td>4</td>
     <td>
      A list of the server API modules for PHP, and their authors.
     </td>
    </tr>

    <tr id="constant.credits-modules">
     <td><strong><code>CREDITS_MODULES</code></strong></td>
     <td>8</td>
     <td>
      A list of the extension modules for PHP, and their authors.
     </td>
    </tr>

    <tr id="constant.credits-docs">
     <td><strong><code>CREDITS_DOCS</code></strong></td>
     <td>16</td>
     <td>
      The credits for the documentation team.
     </td>
    </tr>

    <tr id="constant.credits-fullpage">
     <td><strong><code>CREDITS_FULLPAGE</code></strong></td>
     <td>32</td>
     <td>
      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.
     </td>
    </tr>

    <tr id="constant.credits-qa">
     <td><strong><code>CREDITS_QA</code></strong></td>
     <td>64</td>
     <td>
      The credits for the quality assurance team.
     </td>
    </tr>

    <tr id="constant.credits-all">
     <td><strong><code>CREDITS_ALL</code></strong></td>
     <td>-1</td>
     <td>
      All the credits, equivalent to using: <em>CREDITS_DOCS +
      CREDITS_GENERAL + CREDITS_GROUP + CREDITS_MODULES + CREDITS_QA
      CREDITS_FULLPAGE</em>. It generates a complete stand-alone HTML
      page with the appropriate tags. This is the default value.
     </td>
    </tr>

   </tbody>
  
 </table>


 <table class="doctable table">
  <caption><strong> <span class="function"><a href="function.phpinfo.html" class="function">phpinfo()</a></span> constants</strong></caption>
  
   <thead>
    <tr>
     <th>Constant</th>
     <th>Value</th>
     <th>Description</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr id="constant.info-general">
     <td><strong><code>INFO_GENERAL</code></strong></td>
     <td>1</td>
     <td>
      The configuration line, <var class="filename">php.ini</var> location, build date, Web
      Server, System and more.
     </td>
    </tr>

    <tr id="constant.info-credits">
     <td><strong><code>INFO_CREDITS</code></strong></td>
     <td>2</td>
     <td>
      PHP Credits.  See also  <span class="function"><a href="function.phpcredits.html" class="function">phpcredits()</a></span>.
     </td>
    </tr>

    <tr id="constant.info-configuration">
     <td><strong><code>INFO_CONFIGURATION</code></strong></td>
     <td>4</td>
     <td>
      Current Local and Master values for PHP directives. See
      also  <span class="function"><a href="function.ini-get.html" class="function">ini_get()</a></span>.
     </td>
    </tr>

    <tr id="constant.info-modules">
     <td><strong><code>INFO_MODULES</code></strong></td>
     <td>8</td>
     <td>
      Loaded modules and their respective settings.
     </td>
    </tr>

    <tr id="constant.info-environment">
     <td><strong><code>INFO_ENVIRONMENT</code></strong></td>
     <td>16</td>
     <td>
      Environment Variable information that&#039;s also available in
      <var class="varname"><var class="varname"><a href="reserved.variables.environment.html" class="classname">$_ENV</a></var></var>.
     </td>
    </tr>

    <tr id="constant.info-variables">
     <td><strong><code>INFO_VARIABLES</code></strong></td>
     <td>32</td>
     <td>
      Shows all <a href="language.variables.predefined.html" class="link">
      predefined variables</a> from <em>EGPCS</em> (Environment, GET,
      POST, Cookie, Server).
     </td>
    </tr>

    <tr id="constant.info-license">
     <td><strong><code>INFO_LICENSE</code></strong></td>
     <td>64</td>
     <td>
      PHP License information.  See also the <a href="http://www.php.net/license/" class="link external">&raquo;&nbsp;license faq</a>.
     </td>
    </tr>

    <tr id="constant.info-all">
     <td><strong><code>INFO_ALL</code></strong></td>
     <td>-1</td>
     <td>
      Shows all of the above. This is the default value.
     </td>
    </tr>

   </tbody>
  
 </table>


 <table class="doctable table">
  <caption><strong>INI constants</strong></caption>
  
   <thead>
    <tr>
     <th>Constant</th>
     <th>Value</th>
     <th>Description</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr id="constant.ini-user">
     <td><em>INI_USER</em></td>
     <td>1</td>
     <td>Unused</td>
    </tr>

    <tr id="constant.ini-perdir">
     <td><em>INI_PERDIR</em></td>
     <td>2</td>
     <td>Unused</td>
    </tr>

    <tr id="constant.ini-system">
     <td><em>INI_SYSTEM</em></td>
     <td>4</td>
     <td>Unused</td>
    </tr>

    <tr id="constant.ini-all">
     <td><em>INI_ALL</em></td>
     <td>7</td>
     <td>Unused</td>
    </tr>

   </tbody>
  
 </table>


 <p class="simpara">
  Assert constants, these values are used to set 
  the assertion options in  <span class="function"><a href="function.assert-options.html" class="function">assert_options()</a></span>.
 </p>
 <table class="doctable table">
  <caption><strong> <span class="function"><a href="function.assert.html" class="function">assert()</a></span> constants</strong></caption>
  
   <thead>
    <tr>
     <th>Constant</th>
     <th>INI Setting</th>
     <th>Description</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr id="constant.assert-active">
     <td><strong><code>ASSERT_ACTIVE</code></strong></td>
     <td>assert.active</td>
     <td>
      Enable  <span class="function"><a href="function.assert.html" class="function">assert()</a></span> evaluation.
     </td>
    </tr>

    <tr id="constant.assert-callback">
     <td><strong><code>ASSERT_CALLBACK</code></strong></td>
     <td>assert.callback</td>
     <td>
      Callback to call on failed assertions.
     </td>
    </tr>

    <tr id="constant.assert-bail">
     <td><strong><code>ASSERT_BAIL</code></strong></td>
     <td>assert.bail</td>
     <td>
      Terminate execution on failed assertions.
     </td>
    </tr>

    <tr id="constant.assert-warning">
     <td><strong><code>ASSERT_WARNING</code></strong></td>
     <td>assert.warning</td>
     <td>
      Issues a PHP warning for each failed assertion
     </td>
    </tr>

    <tr id="constant.assert-quiet-eval">
     <td><strong><code>ASSERT_QUIET_EVAL</code></strong></td>
     <td>assert.quiet_eval</td>
     <td>
      Disable <em>error_reporting</em> during assertion expression evaluation.
     </td>
    </tr>

   </tbody>
  
 </table>


 <p class="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.
 </p>
 <table class="doctable table">
  <caption><strong>Windows specific constants</strong></caption>
  
   <thead>
    <tr>
     <th>Constant</th>
     <th>Description</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr id="constant.php-windows-version-major">
     <td><strong><code>PHP_WINDOWS_VERSION_MAJOR</code></strong></td>
     <td>
      The major version of Windows, this can be either <em>4</em> (NT4/Me/98/95), 
      <em>5</em> (XP/2003 R2/2003/2000) or <em>6</em> (Vista/2008).
    </td>
    </tr>

    <tr id="constant.php-windows-version-minor">
     <td><strong><code>PHP_WINDOWS_VERSION_MINOR</code></strong></td>
     <td>
      The minor version of Windows, this can be either <em>0</em> (Vista/2008/2000/NT4/95), 
      <em>1</em> (XP), <em>2</em> (2003 R2/2003/XP x64), <em>10</em> (98) 
      or <em>90</em> (ME).</td>
    </tr>

    <tr id="constant.php-windows-version-build">
     <td><strong><code>PHP_WINDOWS_VERSION_BUILD</code></strong></td>
     <td>The Windows build number (for example, Windows Vista with SP1 applied is build 6001)</td>
    </tr>

    <tr id="constant.php-windows-version-platform">
     <td><strong><code>PHP_WINDOWS_VERSION_PLATFORM</code></strong></td>
     <td>
      The platform that PHP currently is running on, this value is <em>2</em> on Windows 
      Vista/XP/2000/NT4, Server 2008/2003 and on Windows ME/98/95 this value is <em>1</em>.
     </td>
    </tr>

    <tr id="constant.php-windows-version-sp-major">
     <td><strong><code>PHP_WINDOWS_VERSION_SP_MAJOR</code></strong></td>
     <td>
      The major version of the service pack installed, this value is <em>0</em> 
      if no service pack is installed. For example, Windows XP with service pack 3 installed 
      will make this value <em>3</em>.
     </td>
    </tr>

    <tr id="constant.php-windows-version-sp-minor">
     <td><strong><code>PHP_WINDOWS_VERSION_SP_MINOR</code></strong></td>
     <td>
      The minor version of the service pack installed, this value is <em>0</em> 
      if no service pack is installed.
     </td>
    </tr>

    <tr id="constant.php-windows-version-suitemask">
     <td><strong><code>PHP_WINDOWS_VERSION_SUITEMASK</code></strong></td>
     <td>
      The suitemask is a bitmask that can tell if various features of Windows is installed, 
      see the table below for possible bitfield values.
     </td>
    </tr>

    <tr id="constant.php-windows-version-producttype">
     <td><strong><code>PHP_WINDOWS_VERSION_PRODUCTTYPE</code></strong></td>
     <td>
      This contains the value used to determine the <em>PHP_WINDOWS_NT_*</em>
      constants. This value may be one of the <em>PHP_WINDOWS_NT_*</em> constants 
      indicating the platform type.
     </td>
    </tr>

    <tr id="constant.php-windows-nt-domain-controller">
     <td><strong><code>PHP_WINDOWS_NT_DOMAIN_CONTROLLER</code></strong></td>
     <td>This is a domain controller</td>
    </tr>

    <tr id="constant.php-windows-nt-server">
     <td><strong><code>PHP_WINDOWS_NT_SERVER</code></strong></td>
     <td>
      This is a server system (eg. Server 2008/2003/2000), note that if this is a 
      domain controller its reported as <strong><code>PHP_WINDOWS_NT_DOMAIN_CONTROLLER</code></strong>.
     </td>
    </tr>

    <tr id="constant.php-windows-nt-workstation">
     <td><strong><code>PHP_WINDOWS_NT_WORKSTATION</code></strong></td>
     <td>This is a workstation system (eg. Vista/XP/2000/NT4)</td>
    </tr>

   </tbody>
  
 </table>

 <p class="simpara">
  This table shows a list of features that can be checked for using the 
  <strong><code>PHP_WINDOWS_VERSION_SUITEMASK</code></strong> bitmask.
 </p>
 <table class="doctable table">
  <caption><strong>Windows suitemask bitfields</strong></caption>
  
   <thead>
    <tr>
     <th>Bits</th>
     <th>Description</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr>
     <td><em>0x00000004</em></td>
     <td>Microsoft BackOffice components are installed.</td>
    </tr>

    <tr>
     <td><em>0x00000400</em></td>
     <td>Windows Server 2003, Web Edition is installed.</td>
    </tr>

    <tr>
     <td><em>0x00004000</em></td>
     <td>Windows Server 2003, Compute Cluster Edition is installed.</td>
    </tr>

    <tr>
     <td><em>0x00000080</em></td>
     <td>
      Windows Server 2008 Datacenter, Windows Server 2003, Datacenter Edition or 
      Windows 2000 Datacenter Server is installed.
     </td>
    </tr>

    <tr>
     <td><em>0x00000002</em></td>
     <td>
      Windows Server 2008 Enterprise, Windows Server 2003, Enterprise Edition, 
      Windows 2000 Advanced Server, or Windows NT Server 4.0 Enterprise Edition 
      is installed.
     </td>
    </tr>

    <tr>
     <td><em>0x00000040</em></td>
     <td>Windows XP Embedded is installed.</td>
    </tr>

    <tr>
     <td><em>0x00000200</em></td>
     <td>
      Windows Vista Home Premium, Windows Vista Home Basic, or Windows XP Home 
      Edition is installed.
     </td>
    </tr>

    <tr>
     <td><em>0x00000100</em></td>
     <td>
      Remote Desktop is supported, but only one interactive session is supported. 
      This value is set unless the system is running in application server mode.
     </td>
    </tr>

    <tr>
     <td><em>0x00000001</em></td>
     <td>
      Microsoft Small Business Server was once installed on the system, but may have 
      been upgraded to another version of Windows.
     </td>
    </tr>

    <tr>
     <td><em>0x00000020</em></td>
     <td>
      Microsoft Small Business Server is installed with the restrictive client 
      license in force.
     </td>
    </tr>

    <tr>
     <td><em>0x00002000</em></td>
     <td>Windows Storage Server 2003 R2 or Windows Storage Server 2003 is installed.</td>
    </tr>

    <tr>
     <td><em>0x00000010</em></td>
     <td>
      Terminal Services is installed. This value is always set. If this value is set but 
      <em>0x00000100</em> is not set, then the system is running in application 
      server mode.
     </td>
    </tr>

    <tr>
     <td><em>0x00008000</em></td>
     <td>Windows Home Server is installed.</td>
    </tr>

   </tbody>
  
 </table>

</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="info.resources.html">Resource Types</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.info.html">PHP Options/Info Functions</a></div>
 <div class="up"><a href="book.info.html">PHP Options/Info</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>