brandonwamboldt/utilphp — pull request #30 by bdelespierre (2012-10-29 15:17:32+00:00)
Title: Develop

Hello,

I added some of my personnal functions you may find useful:
* array_cartesian_product that calculates the cartesian product of multiple arrays
* array_find_closest that finds the closest value in an array
* callback that converts a function definition into a lambda function
* unaccent_chars that replace accented characters by unaccented characters in a string
* encode_email that makes an email safe from bots
* _str2hex_js that converts a string to its JavaScript hexadecimal representation

I also enhanced validate_email to enable DNS check and multiple email formats (still compliant with PHP's email native function).