Did a—granted, very—quick search, couldn’t find much that was PHP-based and up-to-date, so https://github.com/janboddez/url-shortener …
Previously built a Webmention endpoint on Lumen, too. Worked wonders, although I’ll probably end up making it a Laravel package. (I made an IndieAuth thingy, too, which requires you sign in somehow—like, with a username and password—so that’s def more of a Laravel thing. I mean it, issues [and verifies] *tokens*, but you obviously have to authenticate yourself [and, potentially authorize clients] first.)
Wait, there’s YOURLS, which I think I’ve actually seen before. Anyway, my solution here doesn’t do stats, is based on the Lumen microframework, and uses Hashids—there’s other algorithms going around, but this particular library seems solid enough and I didn’t wanna have to think too much.