Our source is open
The syntax highlighted source is automatically generated by PHP from
the plaintext script.
If you're interested in what's behind the several functions we
used, you can always take a look at the source of the following files:
Of course, if you want to see the source
of this page, we have it available.
You can also browse the SVN repository for this website on
svn.php.net.
Source of: /manual/en/reserved.classes.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/reserved.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'reserved.classes.php',
1 => 'Predefined Classes',
),
'up' =>
array (
0 => 'reserved.php',
1 => 'List of Reserved Words',
),
'prev' =>
array (
0 => 'reserved.keywords.php',
1 => 'List of Keywords',
),
'next' =>
array (
0 => 'reserved.constants.php',
1 => 'Predefined Constants',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="reserved.classes" class="sect1">
<h2 class="title">Predefined Classes</h2>
<p class="para">
This section lists standard predefined classes. Miscellaneous extensions
define other classes which are described in their reference.
</p>
<div id="reserved.classes.standard" class="sect2">
<h3 class="title">Standard Defined Classes</h3>
<p class="simpara">
These classes are defined in the standard set of functions included
in the PHP build.
</p>
<dl>
<dt class="varlistentry">
<span class="term"><b class="classname">Directory</b></span>
</dt><dd class="listitem">
<span class="simpara">
The class from which <a href="class.dir.php" class="link">dir</a> is instantiated.
</span>
</dd>
<dt class="varlistentry">
<span class="term"><b class="classname">stdClass</b></span>
</dt><dd class="listitem">
<span class="simpara">
</span>
</dd>
<dt class="varlistentry">
<span class="term"><b class="classname">__PHP_Incomplete_Class</b></span>
</dt><dd class="listitem">
<span class="simpara">
</span>
</dd>
</dl>
</div>
<div id="reserved.classes.php5" class="sect2">
<h3 class="title">Predefined classes as of PHP 5</h3>
<p class="simpara">
These additional predefined classes were introduced in
PHP 5.0.0.
</p>
<dl>
<dt class="varlistentry">
<span class="term"><a href="class.exception.php" class="classname">exception</a></span>
</dt><dd class="listitem">
<span class="simpara">
</span>
</dd>
<dt class="varlistentry">
<span class="term"><b class="classname">php_user_filter</b></span>
</dt><dd class="listitem">
<span class="simpara">
</span>
</dd>
</dl>
</div>
<div id="reserved.classes.closure" class="sect2">
<h3 class="title">Closure</h3>
<p class="simpara">
The predefined final class <b class="classname">Closure</b> was introduced
in PHP 5.3.0. It is used for internal implementation of <a href="functions.anonymous.php" class="link">anonymous functions</a>.
</p>
<p class="simpara">
The class has a constructor forbidding the manual creation of the object
(issues <b><tt class="constant">E_RECOVERABLE_ERROR</tt></b>) and the
<i>__invoke</i> method with the <a href="language.oop5.magic.php#language.oop5.magic.invoke" class="link">calling magic</a>.
</p>
</div>
<div id="reserved.classes.special" class="sect2">
<h3 class="title">Special classes</h3>
<p class="simpara">
Following identifiers may not be used as a class name as they have
special purpose.
</p>
<dl>
<dt class="varlistentry">
<span class="term"><b class="classname">self</b></span>
</dt><dd class="listitem">
<span class="simpara">
</span>
</dd>
<dt class="varlistentry">
<span class="term"><b class="classname">parent</b></span>
</dt><dd class="listitem">
<span class="simpara">
</span>
</dd>
</dl>
</div>
</div><?php manual_footer(); ?>