1--TEST--
2Bug #64354 (Unserialize array of objects whose class can't be autoloaded fail)
3--FILE--
4<?php
5class A {
6    public function __sleep() {
7        throw new Exception("Failed");
8    }
9}
10
11class B implements Serializable {
12    public function serialize() {
13        return NULL;
14    }
15
16    public function unserialize($data) {
17    }
18}
19
20$data = array(new A, new B);
21
22try {
23    serialize($data);
24} catch (Exception $e) {
25    var_dump($e->getMessage());
26}
27?>
28--EXPECTF--
29Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d
30string(6) "Failed"
31