View Single Post
Old 07-16-2008, 09:06 PM   #8 (permalink)
buggabill
The Contributor
 
buggabill's Avatar
 
Join Date: Jan 2008
Location: Maine, USA
Posts: 92
Thanks: 2
buggabill is on a distinguished road
Default

@xenon:

What you say seems to contradict what delayedinsanity says.

Quote:
Originally Posted by delayedinsanity View Post
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
buggabill is offline  
Reply With Quote