Whats the difference between ? : and ||
<p>What difference is there between using the <code>?:</code> conditional operator and the <code>||</code> Logical <code>OR</code>.</p>

<p>I am finding that my code works with:</p>

<pre><code>$screenpixelratio = !empty($_COOKIE['screenpixelratio']) || $_COOKIE['screenpixelratio'] || $fallback_pixelratio;
</code></pre>

<p>But not:</p>

<pre><code>$screenpixelratio = !empty($_COOKIE['screenpixelratio']) ? $_COOKIE['screenpixelratio'] : $fallback_pixelratio;
</code></pre>

<p>Could someone please explain why it would work with one, but not the other.</p>
