For Each

Starting with PHP 5, you may use PHP's own
foreach statement to iterate
over the contents of a standard COM/OLE IEnumVariant. In layman's terms,
this means that you can use foreach in places where you would have used
For Each in VB/ASP code.

User Contributed Notes 1 note

As described in the PHP 5 COM changes article: http://devzone.zend.com/node/view/id/762You not just "may use foreach statement", but you have to, because $domainObject->Next() is not available in PHP 5 (syntax has been dropped, not backwards compatible)