Get constant value by generated name
Today a colleague of mine ask me if it is possible to call a class constant inside of another class by generating the constant name on the fly. The reason was, that he had multiple constants in one class that had patterned / generic names like that: <?php class IAM_A_CLASS{ const IAM_A_CONSTANT_1 = 1; const […]