The manual entry for constant() says that if the constant is not defined the function should return NULL. In the case of the code below, however, it gives a fatal error.
$constant = get_class($this) . '::' . $name;
$value = constant($constant);
If $name is valid, things work fine. If it's not, however, I get a fatal error "Undefined class constant ..." The manual says it should raise an E_WARNING error too but I'm not seeing this in the log file.
$constantis a variable, not a constant.