DEV Community 👩‍💻👨‍💻

Discussion on: PHP Tuples

blackcat_dev profile image
Sasa Blagojevic Author • Edited on

For the example I used here your suggestion makes perfect sense. You make some valid points, this might not be the best approach if it is going to be publicly exposed, it could be confusing.

Maybe I should have come up with better examples :D

Thank you for reading!


Ok just remember where I used this approach as well:

[$failed, $messages] = $validator->failedWithMessages();

Maybe this example would be better :))