japt
japt

Reputation: 103

How to convert string to conditional expression in PHP?

I have string like this,

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

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

Is it possible?

Upvotes: 5

Views: 1173

Answers (1)

Related Questions