Well, any of the vbulletin php pages use this exact method, so those are a good place to start if you want to see php used and then put into the templates. But, there are several other examples in the articles forums:
[How-To] Include PHP In Templates In vBulletin Powered Pages
Adding Currently Active Users to your own vB page
Create "Latest Threads" Custom Page
That's just a couple. But seriously, look at a vbulletin page.