Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74981 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78356 invoked from network); 19 Jun 2014 06:07:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jun 2014 06:07:51 -0000 Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 93.190.64.237 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 93.190.64.237 mail-1.de-punkt.de Received: from [93.190.64.237] ([93.190.64.237:42467] helo=mail-1.de-punkt.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/32-60202-53E72A35 for ; Thu, 19 Jun 2014 02:07:51 -0400 Received: from localhost (localhost [127.0.0.1]) by mail-1.de-punkt.de (Postfix) with ESMTP id D1F2E3A346; Thu, 19 Jun 2014 08:07:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail-1.de-punkt.de Received: from mail-1.de-punkt.de ([127.0.0.1]) by localhost (mail-1.de-punkt.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D9UqCEbx7DXE; Thu, 19 Jun 2014 08:07:45 +0200 (CEST) Received: from [192.168.178.24] (p4FC7C8A0.dip0.t-ipconnect.de [79.199.200.160]) (Authenticated sender: php@sebastian-bergmann.de) by mail-1.de-punkt.de (Postfix) with ESMTPSA id 324F43A341; Thu, 19 Jun 2014 08:07:45 +0200 (CEST) Message-ID: <53A27E36.2010606@php.net> Date: Thu, 19 Jun 2014 08:07:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Stas Malyshev , Remi Collet , PHP Internals References: <53A1C722.9060501@fedoraproject.org> <53A21137.6010705@sugarcrm.com> In-Reply-To: <53A21137.6010705@sugarcrm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Problems with the fix for the BC break introduced in 5.4.29 and 5.5.13 From: sebastian@php.net (Sebastian Bergmann) Am 19.06.2014 00:22, schrieb Stas Malyshev: > How we can safely make that? For internal classes I'm afraid making them > work safely without ctor would be a challenge - after all, all the code > expects ctor to run. For user classes at least the engine would throw a > fatal error at worst, but for internal classes we'd get segfaults all > over the place. I'm not sure how this can be done safely. The use case I am interested is test doubles. When I create a stub or mock of a class then I do not wants its original functionality to be executed. I just want to have an object that looks like an object of the original class. When the original functionality is not executed, though, how can we run into a segfault when the constructor of an internal class is not executed?