svn: /phpdoc/en/trunk/reference/spl/splobjectstorage/ gethash.xml
| From: | Peter Cowburn | Date: | Sat, 19 Nov 2011 21:09:00 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/spl/splobjectstorage/ gethash.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9055@lists.php.net to get a copy of this message | ||
salathe Sat, 19 Nov 2011 21:09:00 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=319559
Log:
whitespace, spelling, grammar
Changed paths:
U phpdoc/en/trunk/reference/spl/splobjectstorage/gethash.xml
Modified: phpdoc/en/trunk/reference/spl/splobjectstorage/gethash.xml
===================================================================
--- phpdoc/en/trunk/reference/spl/splobjectstorage/gethash.xml 2011-11-19 21:08:45 UTC (rev 319558)
+++ phpdoc/en/trunk/reference/spl/splobjectstorage/gethash.xml 2011-11-19 21:09:00 UTC (rev 319559)
@@ -5,7 +5,7 @@
<refnamediv>
<refname>SplObjectStorage::getHash</refname>
<refpurpose>
- Calculate an unique identifier for the contained objects
+ Calculate a unique identifier for the contained objects
</refpurpose>
</refnamediv>
@@ -24,7 +24,7 @@
the same value as <function>spl_object_hash</function>.
</para>
<para>
- This identifer must unique among the objects contained. This means this
+ This identifier must be unique among the objects contained. This means this
object will never contain more than one object with the same identifier.
As such, it can be used to implement a set (a collection of unique values)
where the quality of an object being unique is determined by the value
@@ -63,15 +63,15 @@
<![CDATA[
<?php
class OneSpecimenPerClassStorage extends SplObjectStorage {
- public function getHash($o) {
- return get_class($o);
- }
+ public function getHash($o) {
+ return get_class($o);
+ }
}
class A {}
$s = new OneSpecimenPerClassStorage;
-$o1 = new stdclass;
-$o2 = new stdclass;
+$o1 = new stdClass;
+$o2 = new stdClass;
$o3 = new A;
$s[$o1] = 1;
@@ -81,7 +81,7 @@
//these are considered equal to the objects before
//so they can be used to access the values stored under them
-$p1 = new stdclass;
+$p1 = new stdClass;
$p2 = new A;
echo $s[$p1], "\n";
echo $s[$p2], "\n";