Convert String value into Constant

php, variables

Solution

echo constant($post);

http://php.net/constant

Problem

I have defined a Constant, ``` define("TEST", "good"); ``` now I have `$post = "TEST";` I just wanted to convert this "test" as an constant. e.g: echo `$post;` it should print `good`

Original source