Re: parent::construct not reliable working on php5.1 b2/b3
| From: | Jochem Maas | Date: | Tue, 02 Aug 2005 22:34:30 +0000 |
| Subject: | Re: parent::construct not reliable working on php5.1 b2/b3 | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-219873@lists.php.net to get a copy of this message | ||
Meno Abels wrote:
it is only a typo in my email i use __constructok - I would recommend cut-n-paste for this kind of output to prevent idiots like me pointing out you typos and to avoid confusion in general. the next questions would be: a, how many parents does the problem class (Link or Links?) have? b, is Rank the base class? c, does Rank::__construct() actually exist? d, does the error also occur with php5.0.x? (as apposed to php5.1beta) given these questions may seem silly - but I can't see your code from here :-) so I figured I'd ask anyway!
Meno 2005/8/2, Jochem Maas <jochem@iamjochem.com>:Pawel Bernat wrote:On Tue, Aug 02, 2005 at 03:42:00PM +0100, Meno Abels wrote:deeeeep class heirarchies can lead to brainfreeze - beware of going to deep :-)Hello, With my application that uses heavily inherent classes, sometimes Ihe seems to be calling _construtor() which although not wrong is not the method he is looking for (cue voice of Alex Guiness for the second time this week :-) try __construct() PS - this kind of thing belongs on generals until you are _sure_ it's an internals problem. IMHO.get the following message: PHP Fatal error: Call to undefined method Rank::_construtor() inWhy do you call _construct instead of __construct? And how do you do it?.../inc/Links.class.php. It works with php4.x when I use the old style of constructor calling $this->(CLASSNAME) . But when working with php 5.2 b2 or b3 in the old OR the new style, I get the PHP Fatal error from above. Is there any hints to look at this problem?Did you read everything at http://php.net/construct (including Note)? What about php 5.0?