This may sound naive, but maybe some expert knows a juicy PHP secret.
I was wondering if there was a PHP function that can take a STRING and evaluate it as a logic statement, returning true/false?
No, not EVAL as eval is evil. Essentially I wondered if there was a user accessible function that performs the evaluation in between () for conditional statements , but DOES NOT call functions or perform any PHP commands.
maybe something that would look like this :
PHPMagic("$a > $b || 2 === (1+1) "); // returns boolean true
most likely what I am asking doesnt exist, but I wanted to make sure. Thanks all!