goba Mon Aug 20 12:25:37 2001 EDT
Modified files:
/phpdoc/en/language oop.xml
Log:
More typos fixed
. object properties should start lowercased
. some misspelled words, and bad examples corrected
Index: phpdoc/en/language/oop.xml
diff -u phpdoc/en/language/oop.xml:1.25 phpdoc/en/language/oop.xml:1.26
--- phpdoc/en/language/oop.xml:1.25 Mon Aug 20 11:54:40 2001
+++ phpdoc/en/language/oop.xml Mon Aug 20 12:25:36 2001
@@ -1,5 +1,5 @@
<?xml encoding="iso-8859-1"?>
-<!-- $Revision: 1.25 $ -->
+<!-- $Revision: 1.26 $ -->
<chapter id="language.oop">
<title>Classes and Objects</title>
@@ -710,12 +710,12 @@
function echoName()
{
- echo "<br>",$this->Name;
+ echo "<br>",$this->name;
}
function setName($name)
{
- $this->Name = $name;
+ $this->name = $name;
}
}
</programlisting>
@@ -741,7 +741,7 @@
set in constructor
set in constructor */
-$bar2 =& new foo('set in constructor');
+$bar2 =& new Foo('set in constructor');
$bar2->echoName();
$globalref[1]->echoName();
@@ -761,7 +761,7 @@
return a reference by default, instead it returns a copy.
<note>
<simpara>
- There is no performance loss (since php 4 and up use reference
+ There is no performance loss (since PHP 4 and up use reference
counting) returning copies instead of references. On the
contrary it is most often better to simply work with copies
instead of references, because creating references takes some
@@ -776,7 +776,7 @@
<informalexample>
<programlisting role="php">
// now we will change the name. what do you expect?
-// you could expect that both $bar and $globalref[0] change their names...
+// you could expect that both $bar1 and $globalref[0] change their names...
$bar1->setName('set from outside');
// as mentioned before this is not the case.
@@ -784,14 +784,14 @@
$globalref[0]->echoName();
/* output:
-set on object creation
-set from outside */
+set from outside
+set in constructor */
// let us see what is different with $bar2 and $globalref[1]
$bar2->setName('set from outside');
-// luckily they are not only equyl, they are thesame variable
-// thus $bar2->Name and $globalref[1]->Name are the same too
+// luckily they are not only equal, they are the same variable
+// thus $bar2->name and $globalref[1]->name are the same too
$bar2->echoName();
$globalref[1]->echoName();