How to safely encode PHP string into alphanumeric only string? E.g. "Hey123 & 5" could become "ed9e0333" or may be something better looking It's not about stripping characters, its about encoding.
The goal is to make any string after this encoding suitable for css id string (alnum), but later I will need to decode it back and get the original string.