r/PHPhelp • • Oct 28 '14

Critique my code please

Hi. Tried some php coding last year and ditched it in favour of python, but want to get back to it. Could anyone have a look and let me know how bad/good is it? Many thanks.

https://github.com/mprz/DomainAgent

8 Upvotes

7 comments sorted by

View all comments

3

u/aisas Oct 28 '14

Use some templating engine (e.g. Twig), so you html and php won't mix. Read PSR-2.

2

u/mprz Oct 28 '14

I've looked at Twig recently and it looks decent. Thinking about implementing Silex and Twig. Thanks!

1

u/[deleted] Oct 28 '14

I honestly wouldn't. Forcing a specific template engine on people is stupid. Instead, design an interface for templating so that this is interchangeable. Then people who actually think they need something over-engineered like twig can have it, and the rest of us can use something that makes more sense.