1--TEST--
2Constructor promotion with default values
3--FILE--
4<?php
5
6class Point {
7    public function __construct(
8        public float $x = 0.0,
9        public float $y = 1.0,
10        public float $z = 2.0
11    ) {}
12}
13
14var_dump(new Point(10.0));
15var_dump(new Point(10.0, 11.0));
16var_dump(new Point(10.0, 11.0, 12.0));
17
18?>
19--EXPECT--
20object(Point)#1 (3) {
21  ["x"]=>
22  float(10)
23  ["y"]=>
24  float(1)
25  ["z"]=>
26  float(2)
27}
28object(Point)#1 (3) {
29  ["x"]=>
30  float(10)
31  ["y"]=>
32  float(11)
33  ["z"]=>
34  float(2)
35}
36object(Point)#1 (3) {
37  ["x"]=>
38  float(10)
39  ["y"]=>
40  float(11)
41  ["z"]=>
42  float(12)
43}
44