Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Equals signs
// One means "Assign this value to this variable"
$number = 1; // This one is an integer (whole number)
$anotherNumber = "1"; // This one is a string
// Two means "Are these the same value?"
if ($number == $anotherNumber) {
// This will be true
// Three means "Are these the same vale AND type?
if ($number === $anotherNumber) {
// This will not be true, because although $number and $anotherNumber
// are both 1, one is an integer type and the other is a string type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.