Skip to content

Instantly share code, notes, and snippets.

@philsturgeon
Created May 2, 2012 11:56
Show Gist options
  • Save philsturgeon/2576068 to your computer and use it in GitHub Desktop.
Save philsturgeon/2576068 to your computer and use it in GitHub Desktop.
// The result of the expression (true && false) is assigned to $g
// Acts like: ($g = (true && false))
$g = true && false;
// The constant true is assigned to $h and then false is ignored
// Acts like: (($h = true) and false)
$h = true and false;
@baileylo
Copy link

baileylo commented May 2, 2012

I thought it was strange that Fuel used AND instead of && for this reason.

@philsturgeon
Copy link
Author

They are not the same, you should use whichever is correct for the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment