mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Housekeeping; reference to Classes and Objects section.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@21791 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0dda59ca82
commit
3dcce4e214
1 changed files with 15 additions and 3 deletions
|
@ -454,7 +454,11 @@ $a = array(
|
|||
echo $a["apple"]["taste"]; # will output "sweet"
|
||||
?>
|
||||
</programlisting>
|
||||
</informalexample></para></sect2></sect1>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="language.types.object">
|
||||
<title>Objects</title>
|
||||
|
@ -463,11 +467,12 @@ echo $a["apple"]["taste"]; # will output "sweet"
|
|||
<title>Object Initialization</title>
|
||||
|
||||
<para>
|
||||
To initialize an object, you use the new statement to instantiate
|
||||
the object to a variable.
|
||||
To initialize an object, you use the <literal>new</literal>
|
||||
statement to instantiate the object to a variable.
|
||||
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
>?php
|
||||
class foo {
|
||||
function do_foo () {
|
||||
echo "Doing foo.";
|
||||
|
@ -476,9 +481,16 @@ class foo {
|
|||
|
||||
$bar = new foo;
|
||||
$bar->do_foo();
|
||||
?>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
<simpara>
|
||||
For a full discussion, please read the section <link
|
||||
linkend="language.oop">Classes and Objects</link>.
|
||||
</simpara>
|
||||
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue