jaras Posted May 26, 2008 Share Posted May 26, 2008 me and a friend have an argument where i say that you should use functions if u can because it makes it easier to make changes, easier to read and in som cases it's faster to write. but he says that it's stupid to use functions... so i was wondering how many are using functions when they are writing php. sorry if this is the wrong place to post this... Quote Link to comment https://forums.phpfreaks.com/topic/107294-do-you-use-functions/ Share on other sites More sharing options...
rarebit Posted May 26, 2008 Share Posted May 26, 2008 A function is useful when you have a section of code that is reused. If the section will only ever be used once then there is no point because your wasting a instruction code jump... Quote Link to comment https://forums.phpfreaks.com/topic/107294-do-you-use-functions/#findComment-550139 Share on other sites More sharing options...
RichardRotterdam Posted May 26, 2008 Share Posted May 26, 2008 i never write php without functions Quote Link to comment https://forums.phpfreaks.com/topic/107294-do-you-use-functions/#findComment-550147 Share on other sites More sharing options...
msimonds Posted May 26, 2008 Share Posted May 26, 2008 When I first started writing PHP, I never used functions.Now I use them in all my scripts. I also agree that if you have code that is going to be used over and over again, it should be done with functions Quote Link to comment https://forums.phpfreaks.com/topic/107294-do-you-use-functions/#findComment-550160 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.