sunwukung Posted September 21, 2009 Share Posted September 21, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/174988-appropriate-use-of-function-declarations/ Share on other sites More sharing options...
ozestretch Posted September 21, 2009 Share Posted September 21, 2009 Do mind me, just subscribing to this thread... I am keen on reading the answers Quote Link to comment https://forums.phpfreaks.com/topic/174988-appropriate-use-of-function-declarations/#findComment-922276 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.