Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

PHP

Ternary Operator (Shorthand if)

1
2
3
4
5
<?php

$x = ($var > 2 ? true : false);

?>
https://snipt.net/embed/d61420eae30dae705bd66b1585eadda2/
https://snipt.net/raw/d61420eae30dae705bd66b1585eadda2/
d61420eae30dae705bd66b1585eadda2
php
PHP
5
2016-12-09T11:25:50
True
False
False
/api/public/snipt/20987/
ternary-operator-shorthand-if
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="nv">$x</span> <span class="o">=</span> <span class="p">(</span><span class="nv">$var</span> <span class="o">&gt;</span> <span class="mi">2</span> <span class="o">?</span> <span class="k">true</span> <span class="o">:</span> <span class="k">false</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
if, logic, php, ternary

TeX

Logic commands in tex

1
2
3
4
5
6
Allquantor = \forall
Existencequantor = \exists
OR = \vee
AND = \wedge
NOT = \neg
Implies = \Rightarrow
https://snipt.net/embed/a5d98fcf8c94dbc1998b2e6dcc370acb/
https://snipt.net/raw/a5d98fcf8c94dbc1998b2e6dcc370acb/
a5d98fcf8c94dbc1998b2e6dcc370acb
tex
TeX
6
2016-12-10T05:02:23
True
False
False
/api/public/snipt/2246/
logic-commands-in-tex
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Allquantor = <span class="k">\forall</span> </span><span id="L-2"><a name="L-2"></a>Existencequantor = <span class="k">\exists</span> </span><span id="L-3"><a name="L-3"></a>OR = <span class="k">\vee</span> </span><span id="L-4"><a name="L-4"></a>AND = <span class="k">\wedge</span> </span><span id="L-5"><a name="L-5"></a>NOT = <span class="k">\neg</span> </span><span id="L-6"><a name="L-6"></a>Implies = <span class="k">\Rightarrow</span> </span></pre></div> </td></tr></table>
logic, tex
Copyrighted, illegal, or inappropriate content? Email [email protected].