|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-12-15 23:26 UTC] crrodriguez at opensuse dot org
[2008-12-17 11:16 UTC] bjori@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 08:00:01 2025 UTC |
Description: ------------ If an abstract class attempts to access a class constant defined by its parent, a fatal error is issued. Reproduce code: --------------- <?php abstract class A { public function foo () { echo $this->bar; //works echo self::BAR; //fatal error } } class B extends A { public $bar = 'foovar'; const BAR = 'fooconst'; } $x = new B; $x->foo(); ?> Expected result: ---------------- foovarfooconst Actual result: -------------- foovar Fatal error: Undefined class constant 'BAR' in...