KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way I can have my PHP function return a different value type? The following code should explain what I mean: <?php public function test($value){ if($value == 1){ return "SUCCESS"; } else { return false; } } ?> On one condition I'm returning a string, otherwise I'm returning a Boolean. Is that allowed/possible?
Tags (comma-separated)
Save Edits
Cancel