PHP: loop schemes