On Tue, 23 Mar 2004, George Schlossnagle wrote:
> On Mar 23, 2004, at 11:53 AM, Andrei Zmievski wrote:
> 
> > On Mon, 22 Mar 2004, Andi Gutmans wrote:
> >> What would you expect? That if a new style constructor is defined we 
> >> always
> >> use that and allow old-style as regular method?
> >
> > Yep.
> 
> 
> I agree with the part about the new-style constructor always being 
> preferred to the old-style constructor, but besides being really 
> confusing, where do you being able to call the old-style as a regular 
> method coming in handy?

I could see people doing:

  class foo {
    function foo() {
       ...constructor stuff...
    }
    function __construct() {
       $this->foo();
    }
  }

In order to make the class work on both PHP4 and PHP5 in which case it 
would be essential for foo() to be callable as a regular method in the 
class.

-Rasmus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to