magic_methods_021.phpt 348 B

123456789101112131415161718192021
  1. --TEST--
  2. __set_state return type should support covariance
  3. --FILE--
  4. <?php
  5. class Foo {
  6. public static function __set_state(array $data): self {}
  7. }
  8. class Foo2 {
  9. public static function __set_state(array $data): static {}
  10. }
  11. class Foo3 {
  12. public static function __set_state(array $data): Foo3|self {}
  13. }
  14. ?>
  15. ===DONE===
  16. --EXPECT--
  17. ===DONE===