Recently, i was building a script that would filter out “unwanted” symbols on text inputs and i saw an awesome function that would filter out unwanted symbols and only retain alpha numeric characters…
Meanwhile, google magically displayed this function on the search results:
cytype_alnum. (See link http://php.net/manual/en/function.ctype-alnum.php)
With this function, it helped me filter out important inputs without rethinking the “wheel”, in a developers term: It saves me from modifying my own RegExp rule that could be filtered out with the one’s php built right into the core.
I hope this helps you! Happy coding!