Using functions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
benedict5980
Forum Newbie
Posts: 6
Joined: Sun Aug 24, 2003 10:52 am

Using functions

Post by benedict5980 »

Hi!

Which is better performance-wise? Using functions or not?
User avatar
daven
Forum Contributor
Posts: 332
Joined: Tue Dec 17, 2002 1:29 pm
Location: Gaithersburg, MD
Contact:

Post by daven »

Umm...how would you write code without using functions?

Modular code is a good thing. Function calls are a good thing. Having one huge mess is a bad thing.

Granted, PHP's OOP stuff is not perfect yet, but even simple functions are better than spaghetti code
pootergeist
Forum Contributor
Posts: 273
Joined: Thu Feb 27, 2003 7:22 am
Location: UK

Post by pootergeist »

one function that will slow down your code (quite drastically in some cases) is sleep(10); ;)
Post Reply