This works fine for me:

abstract class Base {

abstract function getElementName();

        function getName()
        {
                return $this->getElementName();
        }
}

class Derived extends Base {

const ElementName = 'DerivedElementName';

        function getElementName()
        {
                return ElementName;
        }
}

$c = new Derived();
echo $c->getName();

--
Ard

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to