Jump to content

Recommended Posts

Hi all,

this is not so much a technical problem as a design choice. We're having a discussion at work to consolidate disparate coding methods. In general, the PEAR and Zend standards documentation has provided suitable material for defining common practice goals. However, I wanted to ask your opinion about function declarations:

 

Q: Should you declare functions for code that is only used once on a given page request?

 

My feeling is that this is an incorrect use of functions, incurs an unnecessary (perhaps negligible) overhead.

I guess you could also ask a similair question about objects - i.e:

 

Q: At what point is a body of code eligible/ineligible for object construction?

 

What are your thoughts?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.