eddy556 Posted May 28, 2008 Share Posted May 28, 2008 In PHP you can test for a function returning true by doing this: if (function()) { //do stuff } but how do you test for false? Link to comment https://forums.phpfreaks.com/topic/107692-solved-if-function-false/ Share on other sites More sharing options...
DarkWater Posted May 28, 2008 Share Posted May 28, 2008 if (!function()) { } Link to comment https://forums.phpfreaks.com/topic/107692-solved-if-function-false/#findComment-552072 Share on other sites More sharing options...
sasa Posted May 28, 2008 Share Posted May 28, 2008 if(function === false) Link to comment https://forums.phpfreaks.com/topic/107692-solved-if-function-false/#findComment-552081 Share on other sites More sharing options...
eddy556 Posted May 28, 2008 Author Share Posted May 28, 2008 Wow -- an answer in 45 secs! Link to comment https://forums.phpfreaks.com/topic/107692-solved-if-function-false/#findComment-552148 Share on other sites More sharing options...
DarkWater Posted May 28, 2008 Share Posted May 28, 2008 Lol, I didn't think I was that fast. O_O Surprising. Link to comment https://forums.phpfreaks.com/topic/107692-solved-if-function-false/#findComment-552151 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.