note 30912 rejected from language.expressions by alindeman

From: Date: Thu, 03 Apr 2003 12:25:50 +0000
Subject: note 30912 rejected from language.expressions by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-46162@lists.php.net to get a copy of this message
Sorry, my English is bad, my mother tongue is Chinese,is very different from English. I will be happier if there is a 'in' syntax, sometimes the || syntax is very ugly, look: if ($a==1 || $a==2 || $a==3) -or- if (!($a==1 || $a==2 || $a==3)) Although we have $set = array(1,2,3); if (in_array($a,$set)) -or- $set = array(1,2,3); if (!in_array($a,$set)) But it needs two statement, and not clear One day we have: if ($a in [1,2,3]) -or- if ($a not in [1,2,3]) It's better! Just a suggestion!

« previous php.notes (#46162) next »