Skip to content

Quiz · PHP

PHP Basics Quiz: Variables, Types & Syntax

A PHP quiz for beginners: the <?php tag, $variables, echo, string concatenation, single versus double quotes, intdiv(), arrays, count() and strlen().

Questions
15
Difficulty
Easy
Time
~8min
Per question
15sec

What it covers

PHP

A topic in Programming & Coding.

PHP quizzes on variables, strings and arrays, predicting what PHP 8 code prints, and object-oriented PHP with classes, traits and exceptions.

Before you start

How it works

  1. 1

    The clock

    You have 15 seconds for each question. When time runs out, the question counts as wrong.

  2. 2

    Your answer

    Your first choice is the one that counts. It is checked straight away, with an explanation where there is one.

  3. 3

    The score

    At the end you see your score and can go back through every question and its answer.

  4. 4

    The XP

    XP scales with your score. Replays earn XP only when you beat your previous best.

From players

Ratings

Play next

All of PHP

Programming & Coding · PHP

PHP Code Output Quiz: Predict the Result

PHP output questions for PHP 8: loose comparisons, numeric strings, ??, foreach, array_map() and array_filter(), the spaceship operator, match and isset().

Medium difficulty15 questions~10 min
+120 XPPlay

Programming & Coding · PHP

PHP Intermediate Quiz: OOP, Arrays & Error Handling

A PHP OOP quiz: classes, constructor promotion, visibility, traits, static members, exceptions, namespaces, strict types, readonly and the nullsafe operator.

Hard difficulty15 questions~12 min
+150 XPPlay