note 9511 deleted from control-structures by didou
| From: | didou@php.net | Date: | Sat, 09 Aug 2003 04:48:33 +0000 |
| Subject: | note 9511 deleted from control-structures by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53733@lists.php.net to get a copy of this message | ||
Note Submitter: lexzeus@mifinca.com
----
function lex1()
{
print "Hello";
return 1;
}
function lex2()
{
print "World";
return 1;
}
if (lex1() || lex2()) {}
it only print "Hello", so lex2() never been executed.
So, u can also write :
if (
@function1() &&
@function2() &&
@function3() &&
@function4() &&
@function5()) {}
It will do all functions from 1 to 5 but terminated immediately if one of the function is failed.
LexZEUS