Hacker News new | ask | show | jobs
by neilk 5687 days ago
I'm boggling at the concept of doing PHP "the wrong way".

Only small, single-paradigm languages can ever do things "right". With PHP you can do almost anything, in ways that are almost not wrong. ;)

1 comments

I guess the author means 'using php to for writing web apps that are not a index.php file, a file called 'includes.php' and a couple of files called 'header.php', 'content.php' and 'footer.php' which then have functions called 'printHeader() { echo "<table>...</table>" etc. }'.

Basically, the way php application were written 10 years ago. I consider that the 'wrong' way to use php, but it's how it's (necessarily) taught so many people write their first couple of apps this way (and others never rise above this stage).

Exactly. What you describe sounds like the one PHP application I wrote, before I had done much real programming.

By "the right way" I mean idiomatic, maintainable, and taking advantage of its strengths.