blob: 61c7b2d10c04b1be4a8cce511e63eca5f6a57bad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
--TEST--
Constructor promotion with null default, requires an explicitly nullable type
--FILE--
<?php
class Test {
public function __construct(public int $x = null) {}
}
?>
--EXPECTF--
Fatal error: Cannot use null as default value for parameter $x of type int in %s on line %d
|