Test PHP8

Test PHP with answers to assess your knowledge and prepare for job interviews. Assess your technical level in 20 minutes.

Validate and promote your skills
Private results unless you share them
Compare your results to the developers average

Test details

Intermediate
May 2024
11 minutes
4.1/5(17)

PHP is an interpreted, imperative, and object-oriented language.
Mainly used for the creation of website and API, its use is evolving towards the creation of workers, machine learning, web scraping by controlling a browser thanks to Symfony Panther.
Version 8.0, released on November 26, 2020, follows previous version updates by improving the type system. This version also added a set of breaking changes and improvements in terms of performance.

About this quiz
The subjects covered will mainly be the changes brought by this new major version of PHP. Can you find valid syntaxes?
Have you taken enough time to explore what's new? Even JIT compiler, union types, attributes or named arguments ?
This quiz does not deal with any particular framework.
Only PHP under version 8.0 is discussed.
No knowledge of tools or ecosystem is necessary.

This test consists of 20 questions randomly selected from a database of 38 questions in PHP.Discover all our interview questions and answers here
⚠️ Ranking results of all timemay not be relevant because the test has not been taken enough times yet.
1.
developer avatar
Danny Garcia
2591 points
2.
developer avatar
Assan
2583 points
3.
developer avatar
Jordy
2560 points
4.
developer avatar
Julien
2471 points
5.
developer avatar
To
2463 points

Test author : Dylan Ballandras - Stéphanie Trumtel

Presentation of the authors :

  • Dylan Ballandras, backend developer and member of AFUP.
  • Stéphanie Trumtel, backend developer and member of the AFUP Toulouse office
Contributors9
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar

Sample question

What will this code display?

<?php

class Foo
{
    private ?string $bar;

    public function setBar(?string $secondLine): void
    {
        $this->bar = $secondLine;
    }

    public function getBar(): ?string
    {
        return $this->bar;
    }
}

$foo = new Foo();
echo $foo->getBar() ?? 'john doe';
See 38 test questions.Participate in test improvement

Developers ratings

developer avatar
08/05/2024
developer avatar
Lucas Lecoin
28/03/2024
The fact you can't look up elsewhere for more than 5 seconds is bullshit
developer avatar
Bruno
13/03/2024
developer avatar
Rebecca
03/03/2024
developer avatar
Romain
11/02/2024