DEV Community

Discussion on: Which types of loops are most popular in the programming languages you use?

Collapse
bbutlerfrog profile image
Ben Butler • Edited on

PHP developer here, so of course foreach, which arguably is one of the most useful structures even in object-oriented PHP (you can really easily iterate through arrays of objects, for example, because PHP treats almost anything as an array, and the most straightforward way to get at its elements, hence often the fastest, is foreach).