xref: /php-src/Zend/tests/return_types/038.phpt (revision e3d06fc7)
1--TEST--
2__serialize can only declare array as return type
3--FILE--
4<?php
5class Foo {
6    public function __serialize(): \stdClass {}
7}
8?>
9--EXPECTF--
10Fatal error: Foo::__serialize(): Return type must be array when declared in %s on line %d
11