By Sarah Hawk

How Much Do You Really Know About PHP?

By Sarah Hawk

What do you actually know about PHP…? Why not test your knowledge by answering the questions below (you can find the answers at

1. What was the original definition of the acronym PHP?

2. PHP is a loosely typed language. What does this mean?

3. What are magic quotes?

4. Why might you use “htmlspecialchars($name, ENT_QUOTES, ‘UTF-8’)”?

5. What does the following code output?

$var1 = “Hi”;
$var2 = 3;
$var2 = $var1;
$var1 = “Bye”;
echo $var2;

No matter what you scored, we’re confident that our experts can shed some light on your burning PHP questions. Make sure you join our free Talk Object-Oriented PHP with the Experts session at 7am BST this Thursday April 11th.

Our expert is Lorna Mitchell – tutor of the Learnable course Object-oriented PHP and co-author of PHP Master: Write Cutting-edge Code

The session is a 1 hour text based chat session where you are free to ask any questions that you may have. A full transcript of the session will be posted up on SitePoint later in the day in case you can’t make it.

You can find more info on the session in this forum post or find out what time the session will take place in your part of the world here.

A link to the chatroom will be posted in the above forum post on the day, as well as via our Twitter and Facebook pages.

  • Tim

    There is at least one wrongly formatted question in the javascript section:

    “How will the following code be output?

    var text = “Statement one Statement two Statement three”;

    I checked “Statement one Statement two Statement three” and it said:
    “Umm… not quite!
    You cannot create a string that spans multiple lines in JavaScript”

    What multiple lines? There is only one line in the question. ;)

    • Perry

      Javascrpt? I don’t see a JS question.

      • I think Tim means over at Addictive little geeky quizzes. May have a bug or two, but what’s more fun than pointing those out? And we do want to fix them, so go ahead.

  • Moe

    You have an extra ” in the end of your statement replace it with ;

    var text = “Statement one Statement two Statement three”;

    var text = “Statement one Statement two Statement three”;

  • Simon

    PHP question:

    “Which of the following is true for the form below?”

    but there is nothing below, only the 4 answers to choose from. Using Chrome.

  • PHP is as good as C and almost as forgiving, this means that the programmer needs to put more discipline into short, readable and good commented code.

Get the latest in Front-end, once a week, for free.