Reputation: 25
Will the following check both value and data type equality:
if ($fooBar != $fooBarNew)
Upvotes: 0
Views: 24
Reputation: 5849
Use the === comparison operator like so:
===
if ($fooBar === $fooBarNew) { // both variables are identical on value and type level }
Upvotes: 1