Re: php5 class initialization

From: Date: Mon, 22 Mar 2004 10:24:03 +0000
Subject: Re: php5 class initialization
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-8643@lists.php.net to get a copy of this message
What would you expect? That if a new style constructor is defined we always use that and allow old-style as regular method? At 08:56 AM 3/22/2004 +0100, Marcus Boerger wrote:
Hello Andi, Monday, March 22, 2004, 8:00:42 AM, you wrote: We use the last defined constructor. We fixed a problem in B4 where old style constructors didn't always work. If so that's a bug. That's absolutley not understandable. Andi At 12:30 AM 3/22/2004 +0000, t wrote:
<?php class a { function __construct() { echo '__construct()'; } function a() { echo 'a()'; } } $a=new a; ?> Outputs ... a() ... when I would expect ... __construct() ... is this a
bug,
some sort of new (only seeing this occur since RC1) feature, or some option I'm supposed to switch off ? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- Best regards,
 Marcus                            mailto:helly@php.net


« previous php.internals (#8643) next »