inherited method call - I got it!

From: "Gyozo Papp" <pgerzson(at)freestart(dot)hu>
To:
Cc: "[PHP] PostgreSQL" <pgsql-php(at)postgresql(dot)org>
Subject: inherited method call - I got it!
Date: 2001-04-29 11:50:38
Message-ID: 003101c0d0a2$9c2f5180$a449c5d5@jaguar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php


First, thank all of you for your guess & tips.

It wouldn't be so weird to find the right answer if I was thinking about the similarity of PHP and C++ syntax.

and one more pleasure, function overriding is enable and working correctly and all the functions are virtual! OO support of PHP is great! (except multiple inheritance)

So I 've got the answer, look:

class A {
// you've already known it!
}

class B extends A
{
function f1($x)
{
A::f1($x*4); // ancestor class name double colon as the same in C++
$this->x *= 2;
}
}

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Richard Whittaker 2001-05-02 15:49:32 Unixtime function?...
Previous Message Jason k Larson 2001-04-28 23:38:14 Re: inherited method call