xref: /php-src/Zend/tests/return_types/042.phpt (revision e3d06fc7)
1--TEST--
2__debugInfo can declare union return type
3--FILE--
4<?php
5class UnionType {
6    public function __debugInfo(): array|null {}
7}
8
9class UnionType2 {
10    public function __debugInfo(): null|array {}
11}
12
13class UnionTypeOldStyle {
14    public function __debugInfo(): ?array {}
15}
16
17class JustAnArray {
18    public function __debugInfo(): array {}
19}
20
21echo 'No problems!';
22?>
23--EXPECT--
24No problems!
25