I don't think it's necessary to declare matches in this scope, cause preg_match uses references on it.