Get value of dynamically chosen class constant in PHP

Use the constant() function:

$id = constant("ThingIDs::$thing");

Leave a Comment