Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-php by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group