Conditional structures: Difference between revisions

Content added Content deleted
No edit summary
Line 2,567: Line 2,567:
===Other short-circuiting operators===
===Other short-circuiting operators===
<tt>and</tt>, <tt>or</tt>, <tt>&&</tt>, <tt>||</tt> and <tt>//</tt> work as in Perl 5.
<tt>and</tt>, <tt>or</tt>, <tt>&&</tt>, <tt>||</tt> and <tt>//</tt> work as in Perl 5.

=={{header|PHL}}==

If-else:

<lang phl>var a = 5;
if (a == 5) {
doSomething();
} else if (a > 0) {
doSomethingElse();
} else {
error();
}</lang>


=={{header|PHP}}==
=={{header|PHP}}==