Get value of dynamically chosen class constant in PHP

前端 未结 8 1173
无人共我
无人共我 2020-11-29 03:38

I would like to be able to do something like this:

class ThingIDs
{
    const Something = 1;
    const AnotherThing = 2;
}

$thing = \'Something\';
$id = Thi         


        
8条回答
提交回复
热议问题