07-16-2008, 09:06 PM
|
#8 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: Maine, USA
Posts: 92
Thanks: 2
|
@xenon:
What you say seems to contradict what delayedinsanity says.
Quote:
Originally Posted by delayedinsanity
When it comes to conditional statements, you should always use order of precedence - if the first criteria in an AND or && operation is not met, it will not procede to the second.
-m
|
The thing is - I do care what order the methods are called. The script needs to change to the proper directory THEN try to delete the file. If it does not, then the delete will fail. Regardless, I nested them to provide better error handling/reporting and render the possible precedence problem irrelevant.
I guess the real question is: does PHP do short-circuit evaluation? I did a little Googling and found that it does. My original statement will work, but the error handling left a bit to be desired...
__________________
-- Bill
"Why is it drug addicts and computer aficionados are both called users?" -Clifford Stoll
|
|
|
|