Dynamically select a comparison operator (>=, <=, etc) in a conditional?
<pre><code>if (foo &gt;= bar) baz();
</code></pre>

<p>But let's say sometimes baz(); needs to be run when <code>foo &lt;= bar</code>, or <code>foo == bar</code>... and let's say that this comparison operator is grabbed from, say, a db table, and placed into a variable: <code>$param = "&gt;="</code>.</p>

<p>Is there any way you could modify the first line to use <code>$param</code>, besides a switch-case with multiple if statements?</p>

<p>In my code, <code>baz();</code> spans about a whole bunch of lines, and would become an organizational nightmare were I to manage it by hand.</p>
