Re: PHP 4.0 Bug #5917: return in OR statement alowed(like $a OR die("plop");
| From: | Wico de Leeuw | Date: | Wed, 02 Aug 2000 09:45:02 +0000 |
| Subject: | Re: PHP 4.0 Bug #5917: return in OR statement alowed(like $a OR die("plop"); | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-27410@lists.php.net to get a copy of this message | ||
Again :)
$var ? return(1) : return(0);
will work also then i guess
can be quite handy
greetz,
Wico
At 11:10 2-8-00 +0200, Wico de Leeuw wrote:
Hiya Sorry for the bad english / explain but i hope you get what i mean else just ask me please and i try to explain it better ;) P.S. the upload bug submitted (about *_filetype wrong array count) is fixed in cvs (also closed), TNX Greetz, Wico At 08:53 2-8-00 +0000, wico@cnh.nl wrote:-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.netFrom: wico@cnh.nlOperating system: linuxPHP version: 4.0 Latest CVS (02/08/2000) PHP Bug Type: Feature/Change RequestBug description: return in OR statement alowed(like $a OR die("plop"); <?function Test ($a) { !$a OR return(TRUE); // $a or DIE("plop") is allowed } Test(FALSE);?> /* now you have to do : if (!$a) { return(TRUE); } */ -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net