<!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 Classes</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="reserved.keywords.html">List of Keywords</a></div> <div class="next" style="text-align: right; float: right;"><a href="reserved.constants.html">Predefined Constants</a></div> <div class="up"><a href="reserved.html">List of Reserved Words</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><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 class="sect2" id="reserved.classes.standard"> <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> <a href="class.directory.html" class="classname">Directory</a></dt> <dd> <span class="simpara"> Created by <span class="function"><a href="function.dir.html" class="function">dir()</a></span>. </span> </dd> <dt> <strong class="classname">stdClass</strong></dt> <dd> <span class="simpara"> Created by <a href="language.types.object.html#language.types.object.casting" class="link">typecasting to object</a>. </span> </dd> <dt> <strong class="classname">__PHP_Incomplete_Class</strong></dt> <dd> <span class="simpara"> Possibly created by <span class="function"><a href="function.unserialize.html" class="function">unserialize()</a></span>. </span> </dd> </dl> </div> <div class="sect2" id="reserved.classes.php5"> <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> <a href="class.exception.html" class="classname">Exception</a></dt> <dd> <span class="simpara"> </span> </dd> <dt> <a href="class.errorexception.html" class="classname">ErrorException</a></dt> <dd> <span class="simpara"> Available since PHP 5.1.0. </span> </dd> <dt> <a href="class.php-user-filter.html" class="classname">php_user_filter</a></dt> <dd> <span class="simpara"> </span> </dd> </dl> </div> <div class="sect2" id="reserved.classes.closure"> <h3 class="title">Closure</h3> <p class="simpara"> The predefined final class <a href="class.closure.html" class="classname">Closure</a> was introduced in PHP 5.3.0. It is used for representing <a href="functions.anonymous.html" class="link">anonymous functions</a>. </p> <p class="simpara"> For more information, see its <a href="class.closure.html" class="link">class page</a>. </p> </div> <div class="sect2" id="reserved.classes.generator"> <h3 class="title">Generator</h3> <p class="simpara"> The predefined final class <a href="class.generator.html" class="classname">Generator</a> was introduced in PHP 5.5.0. It is used for representing <a href="language.generators.html" class="link">generators</a>. </p> <p class="simpara"> For more information, see its <a href="class.generator.html" class="link">class page</a>. </p> </div> <div class="sect2" id="reserved.classes.php7"> <h3 class="title">Predefined interfaces and classes as of PHP 7</h3> <p class="simpara"> These additional predefined interfaces and classes were introduced in PHP 7.0.0. </p> <dl> <dt> <a href="class.arithmeticerror.html" class="classname">ArithmeticError</a></dt> <dd> <span class="simpara"> </span> </dd> <dt> <a href="class.assertionerror.html" class="classname">AssertionError</a></dt> <dd> <span class="simpara"> </span> </dd> <dt> <a href="class.divisionbyzeroerror.html" class="classname">DivisionByZeroError</a></dt> <dd> <span class="simpara"> </span> </dd> <dt> <a href="class.error.html" class="classname">Error</a></dt> <dd> <span class="simpara"> </span> </dd> <dt> <a href="class.throwable.html" class="classname">Throwable</a></dt> <dd> <span class="simpara"> </span> </dd> <dt> <a href="class.parseerror.html" class="classname">ParseError</a></dt> <dd> <span class="simpara"> </span> </dd> <dt> <a href="class.typeerror.html" class="classname">TypeError</a></dt> <dd> <span class="simpara"> </span> </dd> </dl> </div> <div class="sect2" id="reserved.classes.special"> <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> <strong class="classname">self</strong></dt> <dd> <span class="simpara"> <a href="language.oop5.paamayim-nekudotayim.html" class="link">Current class</a>. </span> </dd> <dt> <strong class="classname">static</strong></dt> <dd> <span class="simpara"> <a href="language.oop5.late-static-bindings.html" class="link">Current class in runtime</a>. </span> </dd> <dt> <strong class="classname">parent</strong></dt> <dd> <span class="simpara"> <a href="language.oop5.paamayim-nekudotayim.html" class="link">Parent class</a>. </span> </dd> </dl> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="reserved.keywords.html">List of Keywords</a></div> <div class="next" style="text-align: right; float: right;"><a href="reserved.constants.html">Predefined Constants</a></div> <div class="up"><a href="reserved.html">List of Reserved Words</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>