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? Quote 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()) { } Quote 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) Quote 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! Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/107692-solved-if-function-false/#findComment-552151 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.