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…
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.
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.