php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #5917 return in OR statement alowed(like $a OR die("plop");
Submitted: 2000-08-02 10:53 UTC Modified: 2002-01-27 01:40 UTC
From: wico at cnh dot nl Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Latest CVS (02/08/2000) OS: linux
Private report: No CVE-ID: None
 [2000-08-02 10:53 UTC] wico at cnh dot 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);
}
*/

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-02 12:45 UTC] waldschrott@php.net
can?t imagine the reason for this beeing forbidden...
 [2002-01-27 01:40 UTC] sterling@php.net
eekkk, PHP != Perl
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 21:01:30 2025 UTC