So I have something like the following:
$a = 3;
$b = 4;
$c = 5;
$d = 6;
and I run a comparison like
if($a>$b || $c>$d
You could use eval, but that you could easily end up exposing your site to all sorts of code injection attacks if you're not very careful.
A safer solution would be to match the proposed operator against a predefined white list and then call a corresponding bit if code with the operator hard - coded.
C.