How Much Do You Really Know About PHP?

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 http://quizpoint.com/)?

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?

<?php
$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.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • http://timwahrendorff.de 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”;
    console.log(text)”

    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.

      • http://www.onsman.com Ricky Onsman

        I think Tim means over at Quizpoint.com. 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”;
    console.log(text)”

    var text = “Statement one Statement two Statement three”;
    console.log(text);

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

  • http://www.business24k.com Perl

    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.