L'instruction break permet de sortir d'une structure for, foreach, while, ... that is in the outer part of a program (e.g. not in a control loop) will end the script.
php.net