I have a constants I want to return by a function like this:
public function getConst($const)
{
$const = constant("Client::{$const}");
return $const;
}
But this is giving me an error:
constant(): Couldn't find constant Client::QUERY_SELECT
This however, does work:
public function getConst($const)
{
return Client::QUERY_SELECT;
}
Why not?