xref: /PHP-8.2/Zend/tests/magic_methods_021.phpt (revision bb8b95be)
1--TEST--
2__set_state return type should support covariance
3--FILE--
4<?php
5
6class Foo {
7    public static function __set_state(array $data): self {}
8}
9
10class Foo2 {
11    public static function __set_state(array $data): static {}
12}
13
14class Foo3 {
15    public static function __set_state(array $data): Foo3|self {}
16}
17
18?>
19===DONE===
20--EXPECT--
21===DONE===
22