mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix the 'instance of an object'
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@219464 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
18f34143e1
commit
841c3eea37
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.17 $ -->
|
||||
<!-- $Revision: 1.18 $ -->
|
||||
|
||||
<sect1 id="language.oop5.basic">
|
||||
<title>The Basics</title>
|
||||
|
@ -127,7 +127,7 @@ EOD;
|
|||
<sect2 id="language.oop5.basic.new">
|
||||
<title>new</title>
|
||||
<para>
|
||||
To create an instance of an object, a new object must be created and
|
||||
To create an instance of a class, a new object must be created and
|
||||
assigned to a variable. An object will always be assigned when
|
||||
creating a new object unless the object has a
|
||||
<link linkend="language.oop5.decon">constructor</link> defined that throws an
|
||||
|
@ -144,9 +144,9 @@ $instance = new SimpleClass();
|
|||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
When assigning an already created instance of an object to a new variable, the new variable
|
||||
When assigning an already created instance of a class to a new variable, the new variable
|
||||
will access the same instance as the object that was assigned. This
|
||||
behaviour is the same when passing instances to a function. A new instance
|
||||
behaviour is the same when passing instances to a function. A copy
|
||||
of an already created object can be made by
|
||||
<link linkend="language.oop5.cloning">cloning</link> it.
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue