📄 reserved.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>List of Reserved Words</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="aliases.html">List of Function Aliases</a></div> <div class="next" style="text-align: right; float: right;"><a href="reserved.classes.html">Predefined Classes</a></div> <div class="up"><a href="appendices.html">Appendices</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div> <h1>List of Reserved Words</h1><h2>Table of Contents</h2><ul class="chunklist chunklist_appendix"><li><a href="reserved.classes.html">Predefined Classes</a></li><li><a href="reserved.constants.html">Predefined Constants</a></li></ul> <p class="para"> The following is a listing of predefined identifiers in PHP. None of the identifiers listed here should be used as identifiers in any of your scripts. These lists include keywords and predefined variable, constant, and class names. These lists are neither exhaustive or complete. </p> <div id="reserved.keywords" class="sect1"> <h2 class="title">List of Keywords</h2> <p class="simpara"> These words have special meaning in PHP. Some of them represent things which look like functions, some look like constants, and so on--but they're not, really: they are language constructs. You cannot use any of the following words as constants, class names, function or method names. Using them as variable names is generally OK, but could lead to confusion. </p> <table border="5"> <caption><b>PHP Keywords</b></caption> <colgroup> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="language.oop5.abstract.html" class="link">abstract</a> (as of PHP 5) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.operators.logical.html" class="link">and</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="function.array.html" class="function">array()</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.foreach.html" class="link">as</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.break.html" class="link">break</a> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.switch.html" class="link">case</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.exceptions.html" class="link">catch</a> (as of PHP 5) </td> <td colspan="1" rowspan="1" align="left"> cfunction (PHP 4 only) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop.html#keyword.class" class="link">class</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop5.cloning.html" class="link">clone</a> (as of PHP 5) </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="language.oop5.constants.html" class="link">const</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.continue.html" class="link">continue</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.declare.html" class="link">declare</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.switch.html" class="link">default</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.do.while.html" class="link">do</a> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.else.html" class="link">else</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.elseif.html" class="link">elseif</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.declare.html" class="link">enddeclare</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.alternative-syntax.html" class="link">endfor</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.alternative-syntax.html" class="link">endforeach</a> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.alternative-syntax.html" class="link">endif</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.alternative-syntax.html" class="link">endswitch</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.alternative-syntax.html" class="link">endwhile</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop.html#keyword.class" class="link">extends</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop5.final.html" class="link">final</a> (as of PHP 5) </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.for.html" class="link">for</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.foreach.html" class="link">foreach</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.functions.html#functions.user-defined" class="link">function</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.variables.scope.html" class="link">global</a> </td> <td colspan="1" rowspan="1" align="left"> goto (as of PHP 5.3) </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.if.html" class="link">if</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop5.interfaces.html" class="link">implements</a> (as of PHP 5) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop5.interfaces.html" class="link">interface</a> (as of PHP 5) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.operators.type.html" class="link">instanceof</a> (as of PHP 5) </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="language.namespaces.html" class="link">namespace</a> (as of PHP 5.3) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop.html#keyword.class" class="link">new</a> </td> <td colspan="1" rowspan="1" align="left"> old_function (PHP 4 only) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.operators.logical.html" class="link">or</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop5.visibility.html" class="link">private</a> (as of PHP 5) </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="language.oop5.visibility.html" class="link">protected</a> (as of PHP 5) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop5.visibility.html" class="link">public</a> (as of PHP 5) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.variables.scope.html" class="link">static</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.switch.html" class="link">switch</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop.html#keyword.class" class="link">this</a> (as of PHP 5) </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="language.exceptions.html" class="link">throw</a> (as of PHP 5) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.exceptions.html" class="link">try</a> (as of PHP 5) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.namespaces.html" class="link">use</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.oop.html#keyword.class" class="link">var</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="control-structures.while.html" class="link">while</a> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="language.operators.logical.html" class="link">xor</a> </td> <td colspan="1" rowspan="1" align="left"> </td> <td colspan="1" rowspan="1" align="left"> </td> <td colspan="1" rowspan="1" align="left"> </td> <td colspan="1" rowspan="1" align="left"> </td> </tr> </tbody> </colgroup> </table> <table border="5"> <caption><b>Compile-time constants</b></caption> <colgroup> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="language.constants.predefined.html" class="link">__CLASS__</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.constants.predefined.html" class="link">__DIR__</a> (as of PHP 5.3) </td> <td colspan="1" rowspan="1" align="left"> <a href="language.constants.predefined.html" class="link">__FILE__</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.constants.predefined.html" class="link">__FUNCTION__</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="language.constants.predefined.html" class="link">__METHOD__</a> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="language.namespaces.html" class="link">__NAMESPACE__</a> (as of PHP 5.3) </td> <td colspan="1" rowspan="1" align="left"> </td> <td colspan="1" rowspan="1" align="left"> </td> <td colspan="1" rowspan="1" align="left"> </td> <td colspan="1" rowspan="1" align="left"> </td> </tr> </tbody> </colgroup> </table> <table border="5"> <caption><b>Language constructs</b></caption> <colgroup> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <a href="function.die.html" class="function">die()</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="function.echo.html" class="function">echo()</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="function.empty.html" class="function">empty()</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="function.exit.html" class="function">exit()</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="function.eval.html" class="function">eval()</a> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <b>include()</b> </td> <td colspan="1" rowspan="1" align="left"> <b>include_once()</b> </td> <td colspan="1" rowspan="1" align="left"> <a href="function.isset.html" class="function">isset()</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="function.list.html" class="function">list()</a> </td> <td colspan="1" rowspan="1" align="left"> <b>require()</b> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"> <b>require_once()</b> </td> <td colspan="1" rowspan="1" align="left"> <b>return()</b> </td> <td colspan="1" rowspan="1" align="left"> <a href="function.print.html" class="function">print()</a> </td> <td colspan="1" rowspan="1" align="left"> <a href="function.unset.html" class="function">unset()</a> </td> <td colspan="1" rowspan="1" align="left"> </td> </tr> </tbody> </colgroup> </table> </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="aliases.html">List of Function Aliases</a></div> <div class="next" style="text-align: right; float: right;"><a href="reserved.classes.html">Predefined Classes</a></div> <div class="up"><a href="appendices.html">Appendices</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -