Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Didn't we all go through this?

    1. Ooo, PHP is awesome, I can make stuff happen on a server!
    2. Hm, well, PHP has its problems, let's open source a microframework to fix it!
    3. Oh my god, PHP is horrible, let's rant about it on a blog!
    4. Who cares that PHP is horrible? It's the application that counts.
OP is at step 3, currently.


I actually had to learn more PHP than I'd have liked to write this post. It was never my language; I started in the Perl days before PHP was a thing, stuck with it, then jumped ship to Python. I've interacted with it in the form of horror stories from colleagues and the occasional having to fix some friend's oekaki thing or whatever.

I wrote this because nobody had written it comprehensively enough, and as an engineer I am inexplicably convinced that I can do everything better than everyone else if I just redo it from scratch.


5. I'm getting old, and life is too short to write PHP.


5. Oh fuck, I've been hacked!


No, not all of us. I've never coded anything with PHP. I don't even know how to write hello world with it.


<? echo "Hello World";


Actually, you just need this:

Hello world

If all you want to do is print some text, just put some text outside the <?php delimiter. If you want to do nothing else, you don't even need the <?php delimiter.


True, but he/she mentioned specifically a "Hello World" in PHP.


    Hello World
is valid PHP




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: