Is it necessary to return any value or does it improve the speed? Sometimes its needed to code functions that not necessary return a value, some just do a set of functions or echo something. Does returning a value improves 'something'?, something like return true or return false?
PHP functions do not need to return anything, and I doubt it would negatively affect the performance if you didn't return anything. If anything, it would positively affect the performance.
No, returning a value from a function does not improve the speed of your script.
You do not need to return values from functions -> it is completely optional.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With