Bear with me ... this will seem a little weird.
I'm not experienced enough at programming in general to point you where you want to go. While I realize that logic and output should be in different places, etc., and have spent a bit of time "UTSL" on 'released semi-commercial code', I can't really speak on your level. :o You might try d-loading some of the better/larger "freeware" packages and see what they've been doing (I've read nola (www.nola.com --- dunno if they still give it away) and phpBB (google for it, well known free forum....) FishCart (fishcart.org) I found a little disorganized, but it's probably that I'm just dumb :rolleyes:
That said, there are a couple nice brainz around here; and, one pastime, for a while, was arranging silly 'coding contests' in the Echo Lounge forum here at phpbuilder....
Now, you may or may not learn what you want, but I can't think of any other place where you can see multiple approaches to the same problem(s), unless it's looking at contest submissions. The winning scripts might be at a high enough level to interest you ... like I say, I'm not sure ... if you want to look at them, I imagine the site search engine would find them rather handily....
As for books and other resources, I generally buy intro-level stuff and hack from there, so I'm sorry I can't be of more help. 🙁 Like I said, there's a few high-class hackers 'round here... mebbe one of them will drop by sometime. 🆒