php-8.0.30-src/Zend/tests/magic_methods_021.phpt

22 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|self {}
}
?>
===DONE===
--EXPECT--
===DONE===