Jump to content

Return with no value or return FALSE ?


terryds

Recommended Posts

"false" is a value. It's a boolean value indicating that a condition is false. If you're not planning to do anything with the return value of the function there's no different between null, false, "n" or 5.

 

A function might return false if something didn't work properly and other values if it did work. You return null if you don't expect the function to return anything the developer wants.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...