View Single Post
  #1  
Old 05-20-2007, 11:07 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Overriding Functions

Since functions became variables...

if an object joins two classes... The latter class overrides the previous, and not the previous the latter...

class yyy:
PHP Code:
function onCreated()
  {
  
join("xyz");
  }

public function 
zzy()
  {
  return 
xyz::zzy() + 2;
  } 
class xyz:
PHP Code:
public function zzy()
  {
  return 
3;
  } 
returns 3 instead of 5.

( This causes joined classes to behave differently than previous versions... Thus, backward incompatibility )

Last edited by Novo; 05-20-2007 at 11:29 AM..
Reply With Quote