Easy text process class in PHP