It is worth noting, that keyword 'self' can be used for constant retrieval from within the class it is defined
<?php
class Foo {
const PARAM_BAR = 'baz';
public function getConst($name) {
return constant("self::{$name}");
}
}
$foo = new Foo();
echo $foo->getConst('PARAM_BAR'); // prints 'baz'
?>