Order of Execution
View Single Post
07-16-2008, 09:06 PM
Join Date: Jan 2008
Location: Maine, USA
What you say seems to contradict what delayedinsanity says.
Originally Posted by
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.
The thing is - I do care what order the methods are called. The script needs to change to the proper directory
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
. My original statement will work, but the error handling left a bit to be desired...
Why is it drug addicts and computer aficionados are both called users?
" -Clifford Stoll
View Public Profile
Send a private message to buggabill
Find More Posts by buggabill