note 48349 added to language.oop5.final

From: Date: Mon, 20 Dec 2004 13:09:23 +0000
Subject: note 48349 added to language.oop5.final
Groups: php.notes 
Request: Send a blank email to php-notes+get-82085@lists.php.net to get a copy of this message
Since there is no "official" explanation to this word, perhaps I might come up with some ;-) Supposing the keyword final has quite a same meaning as in Java, for example, then this key word states an class attribute, declaring that it is supposed not to be extended in further "children" of the class it was declared in. <?php class Foo { final function f1(){ } } class Foo2 extends Foo { function f1(){ /* at this line php should output something like 'final attribute cannot be extended' */ } } ?> No guarantee, by the way, just ... supposing. ---- Manual Page -- http://www.php.net/manual/en/language.oop5.final.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48349 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48349&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48349&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48349&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48349&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48349&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48349&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48349&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82085) next »