Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8573 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29390 invoked by uid 1010); 18 Mar 2004 07:11:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29069 invoked from network); 18 Mar 2004 07:11:18 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 18 Mar 2004 07:11:18 -0000 Received: (qmail 20930 invoked from network); 18 Mar 2004 07:10:45 -0000 Received: from guardian.zend.office (HELO AndiNotebook.zend.com) (10.1.1.4) by mail.zend.com with SMTP; 18 Mar 2004 07:10:45 -0000 Message-ID: <5.1.0.14.2.20040318091014.02428858@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 18 Mar 2004 09:10:42 +0200 To: Lorenzo Alberton , In-Reply-To: <20043181280.576349@the-simpsons> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] redefined constructor: old and new syntax From: andi@zend.com (Andi Gutmans) References: <20043181280.576349@the-simpsons> Well it doesn't really make sense to redefine a constructor. We added it on purpose. Do you want me to change it to E_STRICT? At 01:28 AM 3/18/2004 +0100, Lorenzo Alberton wrote: >Why has this one been committed? > >http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?login=2&r1=1.551&r2=1.552 >&ty=h > > >It prevents constructors being redefined. >That is fine, *except* for the following case: > >class MyClass >{ > function MyClass() { > //constructor for php4, > //SHOULD be ignored by php5 > } > > function __construct() { > //constructor for php5, > //ignored by php4 > } >} > >i.e. it doesn't allow a class to work on both php4 and php5. >Or am I missing something obvious? > >Best regards, >Lorenzo > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php