Jump to content

check if true


denoteone

Recommended Posts

The ! before the function can pretty much be equated to == FALSE;

 

so

 

if (!function()) is the same as if (function() == FALSE)

 

Be careful though... ! checks for both FALSE and 0.. so if your function returns a numeric value, and there's a chance it might be 0, be sure to use

 

if (function() === FALSE)

Link to comment
https://forums.phpfreaks.com/topic/94172-check-if-true/#findComment-482365
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.