what happens in syntax of splobjectstorage?
<p>The below is example2 from php.net's splobjectstorage documentation.
The lines using $s[$o1] and $s[$o2] is syntax I'm not familiar with and haven't seen yet for objects (still learning)</p>

<p>Is this a standard way of fetching properties from an object that would work with any class I've created?</p>

<p>Is this instead using a magic method or additional programmed functionality to create this syntax for just this class?</p>

<pre><code>&lt;?php
// As a map from objects to data
$s = new SplObjectStorage();

$o1 = new StdClass;
$o2 = new StdClass;
$o3 = new StdClass;

$s[$o1] = "data for object 1";
$s[$o2] = array(1,2,3);

if (isset($s[$o2])) {
var_dump($s[$o2]);
}
?&gt;
</code></pre>

<p><a href="http://php.net/manual/en/class.splobjectstorage.php" rel="nofollow">http://php.net/manual/en/class.splobjectstorage.php</a></p>
