Bug #5917 Updated: return in OR statement alowed(like $a OR die("plop");
| From: | sterling@php.net | Date: | Sun, 27 Jan 2002 06:40:27 +0000 |
| Subject: | Bug #5917 Updated: return in OR statement alowed(like $a OR die("plop"); | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-78225@lists.php.net to get a copy of this message | ||
ID: 5917
Updated by: sterling
Old Summary: return in OR statement alowed(like $a OR die("plop");
Reported By: wico@cnh.nl
Old Status: Analyzed
Status: Closed
Bug Type: Feature/Change Request
Operating System: linux
PHP Version: 4.0 Latest CVS (02/08/2000)
New Comment:
eekkk, PHP != Perl
Previous Comments:
------------------------------------------------------------------------
[2000-08-02 12:45:04] waldschrott@php.net
can´t imagine the reason for this beeing forbidden...
------------------------------------------------------------------------
[2000-08-02 10:53:00] wico@cnh.nl
<?
function Test ($a) {
!$a OR return(TRUE); // $a or DIE("plop") is allowed
}
Test(FALSE);
?>
/*
now you have to do :
if (!$a) {
return(TRUE);
}
*/
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=5917&edit=1