Simple reverse cryptograpy algoritm in PHP