Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75659 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51332 invoked from network); 17 Jul 2014 07:58:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2014 07:58:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.99 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.99 smtp99.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.99] ([108.166.43.99:59106] helo=smtp99.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/98-09067-32287C35 for ; Thu, 17 Jul 2014 03:58:27 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp13.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 99D833806A7; Thu, 17 Jul 2014 03:58:24 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp13.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id BE0F23806F6; Thu, 17 Jul 2014 03:58:23 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.4); Thu, 17 Jul 2014 07:58:24 GMT Message-ID: <53C7821F.8040301@sugarcrm.com> Date: Thu, 17 Jul 2014 00:58:23 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Marco Pivetta CC: Zeev Suraski , Laruence , Remi Collet , PHP Internals References: <53C75A89.5000401@fedoraproject.org> <53C7685B.3040302@sugarcrm.com> <248a94f0ee70cf99ffbb0f204443ebbf@mail.gmail.com> <53C7709D.5060208@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] An BC issue in unserialize From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > As discussed in previous threads about this failure, we (doctrine) can > move away from the `unserialize()` hack if > `ReflectionClass#newInstanceWithoutConstructor()` provides support for > internal classes. Could you explain why it is needed to instantiate internal classes without calling the ctor? I'd like to understand the use case more. > It doesn't need to cover ALL internal classes, just the most commonly > extended ones. The problem is we do not know which of these classes may fail if instantiated without initializing. With PHP classes, it's easy since the engine takes care of the basic plumbing. With C classes, if you don't call the function, you get nulls or worse, garbage, in places where values are expected. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/