Annotation of embedaddon/php/ext/standard/tests/serialize/bug65481.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #65481 (shutdown segfault due to serialize)
3: --FILE--
4: <?php
5: echo "Test\n";
6:
7: class A {
8: public $e = array();
9: }
10:
11: class Token implements \Serializable {
12: public function serialize()
13: {
14: $c = new A;
15:
16: for ($i = 0; $i < 4; $i++)
17: {
18: $e = new A;
19: $c->e[] = $e;
20: $e->e = $c->e;
21: }
22:
23: return serialize(array(serialize($c)));
24: }
25:
26: public function unserialize($str)
27: {
28: $r = unserialize($str);
29: $r = unserialize($r[0]);
30: }
31: }
32:
33: $token = new Token;
34: $token = serialize($token);
35:
36: ?>
37: Done
38: --EXPECT--
39: Test
40: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>