PHP/JavaScript Empty String equals 0

Sometimes when you’re looking for something empty/null you might check for an empty string.

// php
$test = 0;
if ($test=="") {
echo 'true';
}
// javascript
var test = 0;
if (test == '') {
alert('true');
}

To avoid this you need to use the === operator. Which means exactly equal to (value & type).