fixing bug 32247

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@181710 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Damien Seguy 2005-03-09 11:40:59 +00:00
parent 84a65f572a
commit 5369811a5e

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.60 $ -->
<!-- $Revision: 1.61 $ -->
<chapter id="language.oop">
<title>Classes and Objects (PHP 4)</title>
@ -101,7 +101,7 @@ class test {
<caution>
<simpara>
The name <literal>stdClass</literal> is used interally by
The name <literal>stdClass</literal> is used internally by
Zend and is reserved. You cannot have a class named
<literal>stdClass</literal> in PHP.
</simpara>
@ -196,13 +196,13 @@ $another_cart->add_item("0815", 3);
functions add_item(), remove_item() and a variable items. These are
distinct functions and variables. You can think of the objects as
something similar to directories in a filesystem. In a filesystem you can
have two different files <filename>README.TXT</filename>, as long as they are in different
directories. Just like with directories where you'll have to type the
full pathname in order to reach each file from the toplevel directory, you
have to specify the complete name of the function you want to call: In PHP
terms, the toplevel directory would be the global namespace, and the
pathname separator would be <literal>-&gt;</literal>. Thus, the names
<varname>$cart-&gt;items</varname> and
have two different files <filename>README.TXT</filename>, as long as they
are in different directories. Just like with directories where you'll have
to type the full pathname in order to reach each file from the toplevel
directory, you have to specify the complete name of the function you want to
call: in PHP terms, the toplevel directory would be the global namespace,
and the pathname separator would be <literal>-&gt;</literal>. Thus, the
names <varname>$cart-&gt;items</varname> and
<varname>$another_cart-&gt;items</varname> name two different variables.
Note that the variable is named <varname>$cart-&gt;items</varname>, not
<varname>$cart-&gt;$items</varname>, that is, a variable name in PHP has
@ -1133,8 +1133,8 @@ o1 !== o2 : TRUE
</screen>
</example>
Which is the output we will expect to obtain given the comparison rules
above. Only instances with the same values for their attributes and from the same
class are considered equal and identical.
above. Only instances with the same values for their attributes
and from the same class are considered equal and identical.
</para>
<para>
Even in the cases where we have object composition, the same comparison