Check user if subscribed to my channel

Yup and that code exists to demonstrate how to generate a token in PHP as simply as possible

As then you can take other knowledge and do what you want with it.
So it doesn’t give an opinion about database or how/where to store tokens or data

Thats on you. It’s outside the scope of “Twitch API”