"my own library of functions" == "a [idiosyncratic and probably sucky] framework".
I recommend learning Symfony because the developers seem to consistently strive to do everything according to "best" practices ... but you could probably learn a lot from any of the popular frameworks.
Don't write your own framework. Please.