A PHP boolean variable note

I am by no means a PHP know-all so this might have been documented.

If I have a boolean variable, say

boolean x = true;

and if I use it in a if statement like:

if ( x == ‘abc’)

The result will always return “true”.

I believe the PHP version I am using is 5.2.

This entry was posted in PHP development. Bookmark the permalink.