<?php Mein Kampf ?>

Don’t worry, I haven’t turned into Hitler. But I’ve been struggling for some time now to learn new programming languages and my most recent struggle is PHP. I’ve finally taken it upon myself to learn it, one of the most important languages to know since the internet practically runs off it, and I had to be persuaded by, of all people (as always with these matters) someone who has no idea about programming but has an idea for a program he wants written; for some reason I’ve ended up as the techie authority in my year even though I’m relatively unskilled so I was the first, and only, unfortunate soul to be roped into it. I’m pretty pleased though in the end that I learnt PHP – it’s probably going to end up a valuable life skill; meanwhile here’s what I think of it…

The Bad

1. Variables are disgusting – the concept of variable types is transparently non-existent which should send shivers up the spine of any programmer.

2. $. The entirely of PHP variables revolves around the Dollar Sign, which is actually rather nice (easy to see what’s going on) but it does mean that I’m constantly hitting shift+$ every time I want a variable, and I invariably end up hitting shift+% or some other key nearby.

The Good

1. String concatenation looks very neat, like Perl: “string1” . “string2” – it just makes code look so much less messy (and no need to press shift)

2. The script is run server-side so security is good and nobody can steal your code (among loads of other useful things about server-side scripting)

3. Even with server-side scripting, PHP can be inserted straight into web pages – just go

4. It’s a curly bracketed language, like C#, Java and C++, rather than Python (yuck) – personal pet preference / hate respectively

5. It’s a Recursive Initialism (PHP: Hypertext Preprocessor)!

Overall I find it a fiddly language to work in, and the two ‘bads’ listed here are almost enough to turn me off forever, and no doubt I will find more problems as I continue my quest to master PHP. Don’t laugh, I will do it … some day.


3 Responses to <?php Mein Kampf ?>

  1. Raj says:


    i am begineer in php

    can you tell me about phpis $_SERVER variable.
    i am waiting to your answer.

  2. Bryant Tan says:


    I myself am still a novice in PHP so don’t expect expert advice from me! However what I have gathered about this variable is that it is a super global array (available to all PHP scripts), and can be used to look up global information about the script or how it was invoked (e.g. query string, script filename etc). It’s a lookup array, so it’s used like $_SERVER[“value_you_want”]

    You might find this useful:

    Cheers, and good luck.

  3. […] of my Labour PHP has been an annoyance to work with, although I somehow managed to write something vaguely (useful?) with it – a ‘predictions […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: