1--TEST--
2Bug #14293 (serialize() and __sleep())
3--FILE--
4<?php
5class t
6{
7    function __construct()
8    {
9        $this->a = 'hello';
10    }
11
12    function __sleep()
13    {
14        echo "__sleep called\n";
15        return array('a','b');
16    }
17}
18
19$t = new t();
20$data = serialize($t);
21echo "$data\n";
22$t = unserialize($data);
23var_dump($t);
24
25?>
26--EXPECTF--
27__sleep called
28
29Warning: serialize(): "b" returned as member variable from __sleep() but does not exist in %s on line %d
30O:1:"t":1:{s:1:"a";s:5:"hello";}
31object(t)#%d (1) {
32  ["a"]=>
33  string(5) "hello"
34}
35