Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84111 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45106 invoked from network); 1 Mar 2015 18:36:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2015 18:36:08 -0000 Authentication-Results: pb1.pair.com header.from=dev@mabe.berlin; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dev@mabe.berlin; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mabe.berlin from 80.237.132.167 cause and error) X-PHP-List-Original-Sender: dev@mabe.berlin X-Host-Fingerprint: 80.237.132.167 wp160.webpack.hosteurope.de Received: from [80.237.132.167] ([80.237.132.167:56065] helo=wp160.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/20-42670-31C53F45 for ; Sun, 01 Mar 2015 13:36:05 -0500 Received: from dslb-188-102-024-210.188.102.pools.vodafone-ip.de ([188.102.24.210] helo=[192.168.178.30]); authenticated by wp160.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1YS8ie-00036n-CV; Sun, 01 Mar 2015 19:36:00 +0100 Message-ID: <54F35C0F.4090905@mabe.berlin> Date: Sun, 01 Mar 2015 19:35:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;dev@mabe.berlin;1425234965;daf1f980; Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Constructor behaviour of internal classes From: dev@mabe.berlin (Marc Bennewitz) Hi Dan, Am 01.03.2015 um 15:55 schrieb Dan Ackroyd: > Hi Internals, > > This email is to announce the formal opening of discussion for an RFC > to clean up the behaviour of the constructors shown by several > internal classes. > > https://wiki.php.net/rfc/internal_constructor_behaviour I really like this RFC as it reduces WTF moments a lot! One note from my perspective: The class "PDORow" is not instantiable and triggers a fatal errors currently. You propose to change the fatal error into an exception. That's definitely better but it's an behavior not possible to implemented in user land code as it would be impossible to get such an object. To define a class not instantiable in user land would be to define the constructor private/protected. Btw. What are the reasons to not make this class instantiable / extendable ? Thoughts? > > For reference this was discussed before > https://marc.info/?l=php-internals&m=142150339323854&w=2 > > As this RFC targets PHP 7, I plan to open the voting before the cut-off date. > > cheers > Dan >