foreach ($a, $b, $c) { next unless /abcdefgh/; ... last; }