Please don't complain about old code not written to today's standards. There are reasons why code can be bad and you don't know what they are. Accept the code is what it is, improve it where you can, and learn something about the
crap a developer before you have had to go through when they wrote it. Even the worst hacks often aren't because they were a bad developer.
You'll have your share of terrible projects that force you to write horrible code without decent requirements to unreasonable deadlines for a client that won't listen. You'll hate what you write. You'll always want to go back and rewrite it but you'll never have the budget. You might quit your job over it. It certainly won't be a reflection of your skill or passion for writing great code. The "ancient PHP code" you're working with now probably isn't a reflection of the developer who wrote it either.