mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
13 lines
283 B
Plaintext
13 lines
283 B
Plaintext
|
--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
|