zendframework/zf2 — pull request #3078 by BlaineSch (2012-11-27 14:38:40+00:00)
Title: Allow NodeList to be accessed via array like syntax.

If we do a execute a selector and get back a NodeList and want just the first element we can now access it like so:

~~~ php
execute('.foo .bar a');

$count = count($results); // get number of matches: 4

$results[2]->getAttribute('id'); // access individually

foreach ($results as $result) { // or iterate
// $result is a DOMElement
}
?>
~~~

Where before you could only iterate them which is really ineffective for a lot of projects.