note 48823 added to function.aggregate

From: Date: Fri, 07 Jan 2005 20:16:20 +0000
Subject: note 48823 added to function.aggregate
Groups: php.notes 
Request: Send a blank email to php-notes+get-82930@lists.php.net to get a copy of this message
Note that even if this can be used to emulate multiple inheritance to some extent, an object in PHP can only be subclass of the class used in the class declaration and no other. <?php class A {} class B {} class C extends A { function C() { aggregate($this, 'B'); // emulate multiple inheritance } } $c = new C; echo (int)is_subclass_of($c, 'B'); /* Output: 0 */ ?> ---- Manual Page -- http://www.php.net/manual/en/function.aggregate.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48823 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48823&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48823&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48823&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48823&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48823&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48823&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48823&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82930) next »