Built-in classes that cannot be serialized
| From: | Sebastian Bergmann | Date: | Mon, 26 Nov 2018 09:27:42 +0000 |
| Subject: | Built-in classes that cannot be serialized | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-103502@lists.php.net to get a copy of this message | ||
The following classes register zend_class_serialize_deny: Closure, COM, DOTNET, Generator, HashContext, Reflection, ReflectionClass, ReflectionClassConstant, ReflectionExtension, ReflectionException, ReflectionFunction, ReflectionFunctionAbstract, ReflectionGenerator, ReflectionMethod, ReflectionNamedType, ReflectionObject, ReflectionParameter, ReflectionProperty, ReflectionRype, ReflectionZendExtension, SimpleXmlElement, SplFileInfo, Variant.
Are these all the built-in classes that cannot be serialized?
Would it be possible to implement ReflectionClass::isSerializable() that returns false when the class is a) built-in and b) has zend_class_serialize_deny registered?