throw new \
Error(sprintf('Call to %s method "%s::__serialize()".',
$reflector->
getMethod('__serialize'
)->
isProtected() ? 'protected' : 'private',
$class));
} if (!\
is_array($serializeProperties =
$value->
__serialize())) { throw new \
TypeError($class.'::__serialize() must return an array'
);
} if ($reflector->
hasMethod('__unserialize'
)) { $properties =
$serializeProperties;
} else { foreach ($serializeProperties as $n =>
$v) { $c = \PHP_VERSION_ID >= 80100 &&
$reflector->
hasProperty($n) && ($p =
$reflector->
getProperty($n))->
isReadOnly() ?
$p->class : 'stdClass';
$properties[$c][$n] =
$v;
} } goto prepare_value;
} $sleep = null;
$proto = Registry::
$prototypes[$class];
if (($value instanceof \ArrayIterator ||
$value instanceof \ArrayObject
) && null !==
$proto) {