<?php interface IFace { const FOO = __CLASS__; const BAR = __CLASS__; } class ClassA implements IFace { // PHP Fatal error: Cannot inherit previously-inherited or override constant FOO from interface //const FOO = __CLASS__; } class ClassB extends ClassA { // works const FOO = __CLASS__; } echo ClassB::FOO . "\n"; echo ClassB::BAR . "\n";
You have javascript disabled. You will not be able to edit any code.