1--TEST--
2Test __sleep returns non-array
3--FILE--
4<?php
5class foo
6{
7    private $private = 'private';
8}
9
10class bar extends foo
11{
12    public function __sleep()
13    {
14        return (new bar());
15    }
16}
17
18serialize(new bar());
19?>
20--EXPECTF--
21Warning: serialize(): bar::__sleep() should return an array only containing the names of instance-variables to serialize in %s on line %d
22