I was wondering what employers wanted to see for sample PHP code. I have worked on a lot of site that are confidential and I cannot easily use the code without changing it drastically.
Also are there specific type of design that employers are looking for? I have about 3-4 years of PHP experience.
Thanks.
Depends on what they're looking for
Object oriented code, simple code?
OO code. I've used a lot of class and have written some myself. Some positions ask for no more than 200 lines of code.
If I were hiring, I would want to see clear code that was efficient without sacrificing readability (and therefore maintainability). I would be additionally impressed if that code demonstrated an understanding of OO design, such as utilizing inheritance of an abstract class by concrete classes.
Good structure in the code. ie. not spaghetti code, nicely commented and indented etc. PHPDoc comments.
OO a big plus, php5 preferably