PHP Performance Tips?

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
jbkosman
Forum Newbie
Posts: 2
Joined: Mon Jun 03, 2002 5:21 am

PHP Performance Tips?

Post by jbkosman »

Hi.

Was wondering if anyone knows the following:

a) are there any performance advantage in using classes instead of regular functions.

b) i have a set of functions that's called via include() every time a page is called. instead of the server calling the functions from disk everytime a user makes a page request, is it possible to load these functions into ram every time php is started? i guess via the php config file?

c) any other performance related tips are welcome.

thanks...
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

1. No, Objects are in fact, slower than functions.

For the rest of your answers, check out this article:

http://phplens.com/lens/php-book/optimi ... ng-php.php
Post Reply