note 30912 added to language.expressions

From: Date: Thu, 03 Apr 2003 04:35:42 +0000
Subject: note 30912 added to language.expressions
Groups: php.notes 
Request: Send a blank email to php-notes+get-46150@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! -- http://www.php.net/manual/en/language.expressions.php http://master.php.net/manage/user-notes.php?action=edit+30912 http://master.php.net/manage/user-notes.php?action=delete+30912 http://master.php.net/manage/user-notes.php?action=reject+30912

« previous php.notes (#46150) next »