Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80785 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3367 invoked from network); 19 Jan 2015 10:05:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2015 10:05:10 -0000 X-Host-Fingerprint: 80.177.120.119 marston-home.demon.co.uk Received: from [80.177.120.119] ([80.177.120.119:19389] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/C6-64889-5D6DCB45 for ; Mon, 19 Jan 2015 05:05:10 -0500 Message-ID: To: internals@lists.php.net References: <0DD30A0D-E7CA-4150-83E0-8FD46635279C@ajf.me> <8761c6280g.fsf@margaine.com> <54B91D16.70901@gmail.com> <78.22.47555.7C24AB45@pb1.pair.com> <1421519637.40188.1.camel@proposaltech.com> <54BABA93.9070809@gmail.com> In-Reply-To: Date: Mon, 19 Jan 2015 10:05:01 -0000 Lines: 1 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 X-Posted-By: 80.177.120.119 Subject: Re: [PHP-DEV] [RFC] Remove PHP 4 Constructors From: TonyMarston@hotmail.com ("Tony Marston") "Marcio Almada" wrote in message news:CAOsHV+uhO3OVS-BEQMDjomz4SDWOYjN7ZNMCqMT8BYyNuGQVXw@mail.gmail.com... > >> Perhaps there should be a new rule which says that invoking a constructor >> with anything other than "new" or "parent::__contruct()" >> should be illegal, in which case this situation would generate an error. > >Now this would break a lot of code that $obj->__construct(); or >$this->__construct(); And I've seen a lot of it. Surely, according to the principles of OO, a class constructor should ONLY be called when the class is constructed/instantiated into an object via the "new" verb? Google for "class constructor" and you will see all those links which say the same thing. -- Tony Marston