Algorithms used in PHP