xref: /PHP-8.2/Zend/tests/bug30791.phpt (revision a31f4642)
1--TEST--
2Bug #30791 (magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded)
3--FILE--
4<?php
5
6class a
7{
8    public $a = 4;
9    function __call($name, $args) {
10        echo __METHOD__, "\n";
11    }
12}
13
14$b = new a;
15var_dump($b);
16$c = unserialize(serialize($b));
17var_dump($c);
18
19?>
20--EXPECT--
21object(a)#1 (1) {
22  ["a"]=>
23  int(4)
24}
25object(a)#2 (1) {
26  ["a"]=>
27  int(4)
28}
29