Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php program performance opinion/practice/fact?

Status
Not open for further replies.

BobMCT

IS-IT--Management
Sep 11, 2000
756
US
Fellow php'ers:

Have a quick question that there seems to be several opinions on and no decisively clear answer. I thought I would present it and gather additional input:

In a php program/script interacting with a web user through apache2, is it best to let the logic "drop" out the bottom of the code after presenting its output -OR- to explicitly execute an exit instruction?

In all likely hood web service programs/scripts will be called upon time and time again so the former would seem wise. But I do not know specifically what the system overhead would be and how apache2 handles executables like this.

Opinions, statistics, real life situations, etc., all appreciated in the interest of learning.

Thanks
 
I've read software-writing standards which require an explicit exit() statement at every program exit point. I have also read at least one book on general programming which recommended the practice.

But PHP doesn't need an explicit exit statement for the program to terminate. The only reason I can think of where you need the functionality of an exit statement is to explicitly set a return value from a script.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top