Re: Re: Class::__construct() vs. $this->__construct()
| From: | Michael Wallner | Date: | Fri, 01 Apr 2005 13:20:03 +0000 |
| Subject: | Re: Re: Class::__construct() vs. $this->__construct() | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37040@lists.php.net to get a copy of this message | ||
Hi Joe Stump, you wrote:
> In a final response to my initial question ...
>
> It looks like the best way to have your code run properly in both PHP5
> and PHP4 is to do the following:
>
> I only asked because I saw XML_Parser was calling
> XML_Parser::__construct() from function XML_Parser(). I though
> $this->__construct() would be safer. A bug possibly?
Nope, either don't use __construct() for PHP4 code or use class
scope, not object scope. It will safe you from many hard to track
and odd bugs/behaviours.
Regards,
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc