Ask Experts Questions for FREE Help!
Answer   ||    Advanced Search

Ask your question or search...
International Sites: Nederlandse experts vragen
User Name 
Password 
Join   Forgot password? 

Home > Computers & Technology > Internet & the Web   »   PHP5 Screwy Inherritance

Question
 
 
#1  
Old Jan 16, 2006, 09:38 PM
Ademan
Junior Member
Ademan is offline
 
Join Date: Jan 2006
Posts: 40
Ademan See this member's comment history on his/her Profile page.
PHP5 Screwy Inherritance

Ok, i have this lovely situation, lets say i have 3 classes, A, B, and C.
C derives from B which derives from A (extends).
A defines the member function foo.
B doesnt do anything regarding foo.
C wants to redefine foo.

QUESTION: does ignoring an inherrited member function mark it implicitly as final?

heres "sample" code

class A
{
function foo()
{
//some function body
}
}

class B extends A
{
//anything not regarding foo
}

class C extends B
{
function foo()
{
//redefined body
}
}

the problem is when i try and call foo from a class C, i get an error (it looks like $this is not defined)

thanks a lot
-Dan

Reply With Quote
 
     

Answers
 
 
Old Jan 19, 2006, 09:33 PM   #2  
Junior Member
Ademan is offline
 
Join Date: Jan 2006
Posts: 40
Ademan See this member's comment history on his/her Profile page.
Well, as it turns out the problem was elsewhere, meh. The example i have is perfectly valid.

cheers
-Dan
  Reply With Quote
 
     

Your Answer
Email me when someone replies to my answer
Join Login



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Ask your question or search...



Similar Threads
php_write in php5 gives cannot read error
(3 replies)
PHP5 MySQL Hosting
(11 replies)

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Search this Thread

Advanced Search

Bookmarks





Copyright ©2003 - 2009, Ask Me Help Desk.
All times are GMT -8. The time now is 10:38 PM.