1--TEST--
2GMP serialization and unserialization via magic methods
3--EXTENSIONS--
4gmp
5--FILE--
6<?php
7
8$n = gmp_init(13);
9var_dump($n);
10$a = $n->__serialize();
11var_dump($a);
12
13$n -= 11;
14var_dump($n);
15$n->__unserialize($a);
16var_dump($n);
17
18?>
19--EXPECT--
20object(GMP)#1 (1) {
21  ["num"]=>
22  string(2) "13"
23}
24array(1) {
25  [0]=>
26  string(1) "d"
27}
28object(GMP)#2 (1) {
29  ["num"]=>
30  string(1) "2"
31}
32object(GMP)#2 (1) {
33  ["num"]=>
34  string(2) "13"
35}
36