function a(){
b(1); // Returns true
b(0); // Echoes "Just some output"
}
function b($i_feel_like_it){
if($i_feel_like_it){
return return true;
}else{
echo "Just some output";
}
}
Is it possible to call a "return" function from within a different function?
The purpose for this is i have a class with lots of functions.. and instead of writing a bunch of code that determines whether they should return some value, i want to simply put a function like "validate()" and have the function call a return if necessary, otherwise continue with the function.
Just wondering if it's possible to do this.