mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
21 lines
348 B
PHP
21 lines
348 B
PHP
--TEST--
|
|
__set_state return type should support covariance
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
public static function __set_state(array $data): self {}
|
|
}
|
|
|
|
class Foo2 {
|
|
public static function __set_state(array $data): static {}
|
|
}
|
|
|
|
class Foo3 {
|
|
public static function __set_state(array $data): Foo3|Foo2 {}
|
|
}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|