lundi 7 mai 2018

What's the most efficient way to shorten if statement if((empty($a) && !empty($b)) || (!empty($a) && empty($b))?

How would one shorten this if statement?

$a = null;
$b = "foo";

if ((empty($a) && !empty($b)) || (!empty($a) && empty($b)) {}

Aucun commentaire:

Enregistrer un commentaire