Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103502 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 89249 invoked from network); 26 Nov 2018 13:04:24 -0000 Received: from unknown (HELO scarlet.netpirates.net) (188.94.27.5) by pb1.pair.com with SMTP; 26 Nov 2018 13:04:24 -0000 Received: from p5de2cba8.dip0.t-ipconnect.de ([93.226.203.168] helo=[192.168.178.42]) by scarlet.netpirates.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gRDBB-0007NW-7J for internals@lists.php.net; Mon, 26 Nov 2018 10:27:45 +0100 To: internals@lists.php.net Reply-To: internals@lists.php.net Message-ID: Date: Mon, 26 Nov 2018 10:27:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Built-in classes that cannot be serialized From: sebastian@php.net (Sebastian Bergmann) 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?