Question from the PHP8 test

Is this PHP code valid?

Medium

Is this code valid?

<?php

class Test {
    public function __construct(public array ...$strings) {}
}
Author: W3D TeamStatus: PublishedQuestion passed 939 times
Edit
2
Community Evaluations
developer avatar
David
18/02/2024
en quoi ce n'est pas valide ?
developer avatar
Auteur anonyme
22/08/2024
Fatal error: Cannot declare variadic promoted property in /home/user/scripts/code.php on line 4
developer avatar
Vincent
06/07/2024
Cannot declare variadic promoted property