Boolean compare question
Posted: Tue Jul 03, 2007 4:09 am
Is there any difference in comparing between these three examples?
Or is it just a matter of own preference?
I ask this because I see often !== true or !== false witch can also be written as === false or === true.
Or is it just a matter of own preference?
I ask this because I see often !== true or !== false witch can also be written as === false or === true.
Code: Select all
if (file_exists($file) === true)
if (file_exists($file) === false)Code: Select all
if (file_exists($file) === true)
if (file_exists($file) !== true)Code: Select all
if (file_exists($file) !== false)
if (file_exists($file) === false)