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

My Results

Test details

Intermediate
October 2024
11 minutes
4.2/5(21)

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
1.
developer avatar
Kadir ARLI
2826 points
2.
developer avatar
nambinina
2654 points
3.
developer avatar
4.
developer avatar
Mounir
2623 points
5.
developer avatar
Nicolas DENIS
2609 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

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.Participate in test improvement

Developers ratings

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
developer avatar
08/05/2024