mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Document goto
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@272953 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
84c2ee3c4e
commit
f48f8c7585
3 changed files with 70 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.79 $ -->
|
||||
<!-- $Revision: 1.80 $ -->
|
||||
|
||||
<appendix xml:id="reserved" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>List of Reserved Words</title>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<link linkend="language.variables.scope">global</link>
|
||||
</entry>
|
||||
<entry>
|
||||
goto (as of PHP 5.3)
|
||||
<link linkend="control-structures.goto">goto</link> (as of PHP 5.3)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.174 $ -->
|
||||
<!-- $Revision: 1.175 $ -->
|
||||
<chapter xml:id="language.control-structures" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Control Structures</title>
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
|||
&language.control-structures.include;
|
||||
&language.control-structures.require-once;
|
||||
&language.control-structures.include-once;
|
||||
&language.control-structures.goto;
|
||||
|
||||
</chapter>
|
||||
|
||||
|
|
66
language/control-structures/goto.xml
Normal file
66
language/control-structures/goto.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<sect1 xml:id="control-structures.goto" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title><literal>goto</literal></title>
|
||||
<para>
|
||||
The <literal>goto</literal> operator can be used to jump to other
|
||||
instruction in the program. The target place is specified by the label and a
|
||||
colon and <literal>goto</literal> is followed by that label.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><literal>goto</literal> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
goto a;
|
||||
echo 'Foo';
|
||||
|
||||
a:
|
||||
echo 'Bar';
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Bar
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The <literal>goto</literal> operator is available since PHP 5.3.
|
||||
</para>
|
||||
</note>
|
||||
<warning>
|
||||
<para>
|
||||
It is not allowed to jump into loop or switch statement. Fatal error is
|
||||
issued in such case.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
</sect1>
|
||||
|
||||
<!-- 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:"../../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
|
||||
-->
|
Loading…
Reference in a new issue