justravis Posted August 19, 2007 Share Posted August 19, 2007 How does 'return;' differ from 'return false;' or return true;'? THANKS!!! Link to comment https://forums.phpfreaks.com/topic/65730-return/ Share on other sites More sharing options...
NArc0t1c Posted August 20, 2007 Share Posted August 20, 2007 well, basically what it tells you. the return function will simply return nothing. I rather suggest using false or 0. Link to comment https://forums.phpfreaks.com/topic/65730-return/#findComment-328633 Share on other sites More sharing options...
justravis Posted August 20, 2007 Author Share Posted August 20, 2007 i thot it was the equivalent of return false; but i could not find any documentation stating the fact...tho i hav recently found instances where they behave differently...u r right...return false; is best. Link to comment https://forums.phpfreaks.com/topic/65730-return/#findComment-329333 Share on other sites More sharing options...
emehrkay Posted August 21, 2007 Share Posted August 21, 2007 easy test function test(){ return; } x = test(); alert(typeof(x)); Link to comment https://forums.phpfreaks.com/topic/65730-return/#findComment-329480 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.