![When PHP Frameworks Suck](https://images.ctfassets.net/vzl5fkwyme3u/2H05p7yk8iyAjFi9j3ui8d/6f8037faa2a3c5b5f6abf66549b2dc80/frameworks_suck.png?w=1000)
If you are working as a PHP software developer, there is an extremely high chance that all of your application, you’re currently working on, using frameworks of any kind.
PHP community developers of all levels worship frameworks since there are big historical and practical reasons for that.
### Historical reasons
But that opened a space for frameworks to step in and introduce t...
![Iterator in PHP](https://images.ctfassets.net/vzl5fkwyme3u/5I2KRmarVm4Gg0GuYcOeSk/b8c5156475053a19537059c19f244d61/AdobeStock_144145979.jpeg?w=1000)
Every time I see this
$users = [new User(), new User()];
I see a lost opportunity to use Iterator.
### Why Iterators?
Collections are an awesome way to organize your previously no-named array. There is a couple of reasons why you should use iterators. One of reason stays for behavior, you can specify exact behavior on standard calls such as next, current, valid etc. Other reason could be that you want to ensure that collection contains an only specific type of an object.
Understand a suffer from using an array of unknown value types.
Very common in the PHP world arrays are used to store all kind of data, in many dimensions in many nested forms. Arrays introduced infinite flexibility to the developer, but because of that, they become very evil.