php: convert string to slug

there’s no standard slug function in php. most softwares nowadays comes with function to slug-ify a string to format seo friendly url. but working on a standalone program, this is …