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
October 2024
11 minutes
4.3/5(22)

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 40 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.
2.
developer avatar
Assan
2537 points
3.
developer avatar
Baptiste Fotia
2522 points
4.
developer avatar
Owen GUERIN
2458 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
Contributors11
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
developer avatar
Participate in test improvement

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 40 test questions.

Developers ratings

developer avatar
Jean-Jacques PERUZZI
06/12/2024
developer avatar
Mounir
28/10/2024
developer avatar
Laurent
22/08/2024
Bonnes questions dans l'ensemble. Certaines n'ont pas trop de rapport avec le PHP8. Pas mal de piège dans les énoncés, un peu comme quand on passe le code de la route ^^. Le temps attribués à chaque question peut parfois être problématique vu le nombre de proposition de réponse à évaluer.
developer avatar
Yazan
08/07/2024
merci ,il est un test efficace
developer avatar
Vincent
06/07/2024
Intéressant sur les nouveautés PHP 8