Skip to content

Instantly share code, notes, and snippets.

@jeremyfelt
Created November 28, 2012 23:29
Show Gist options
  • Save jeremyfelt/4165530 to your computer and use it in GitHub Desktop.
Save jeremyfelt/4165530 to your computer and use it in GitHub Desktop.
Booligans
<?php
$x = true;
$y = false;
if ( $x && $y )
echo 'does not echo - false';
if ( $x and $y )
echo 'also does not echo - false';
$a = $x && $y; // a evaluates to false;
$b = $x and $y; // a evaluates to true;
var_dump( $a, $b );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment