sowmithrii Posted December 4, 2007 Share Posted December 4, 2007 hi guys, i got some doubts regarding return statement. what happends if i call a function which contains a statement like return false; and how can we tackle that false in the calling function. thanks and regards. sowmithrii Link to comment https://forums.phpfreaks.com/topic/80118-return-statement-not-working/ Share on other sites More sharing options...
rajivgonsalves Posted December 4, 2007 Share Posted December 4, 2007 consider this function test1() { return false; } if (test1()==false) { print "Returned false"; } //same return if (!test1()) { print "Returned false"; } basically the function if use in the if statement will cause the if block to be ignored Link to comment https://forums.phpfreaks.com/topic/80118-return-statement-not-working/#findComment-406001 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.