How to convert string to conditional expression in PHP?

I have a line like this,

$condition = "if($test == '1')";

I want to convert it to a conditional expression without using eval().

Is it possible?

+5
source share

All Articles