do not use php55 feature to determine class of iterator