![]() |
|
#1
|
||||
|
||||
Optimising PHPOkay as a relative newbie I didn't understand this fairly lengthy read but people who are in charge of a server may find it very interesting.
http://phplens.com/lens/php-book/opt...ugging-php.php |
|
#2
|
||||
|
||||
|
For a relative newbie to PHP, this article is overkill.
Also, unless you're seriously into web developing and manage your own server, this article's server tweaks and optimisation tips is lost on the average webmaster who hosts his/her site on Virtual / Shared Web Hosting plans. The article is informative, there is absolutely no doubt about it - I think it answered one question I have been asking myself recently: Quote:
... I am glad I went with my instincts. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
||||
|
||||
|
Well...unset() is all but useless nowadays anyways unless you want to reuse an array or variable and you need to make absolutely sure that the old one is removed from memory...unset() is automatically called at script ermination in any case so you almost never really need to call it explicitly. One good use for unset(), however, is to use it as part of a "logout" script in conjunction with session_destroy() this way when a user is logged in to a site their info stays with them but when they log out or time out you can session_destroy() and unset all of their info to make sure they are completely logged out and could even use this to change the users $SID....just a thought...personally I never use it as I don't have any arrays that are load intensive enough to worry about it...which is the other use of unset() simply calling it to destroy arrays or parts of arrays that are no longer being used in really large chunks of code...of course if your chunks are large enough to NEED to be unset you should probably look for a faster, cleaner, smaller way of writing the code...I can't personally think of anything you would want to code that you would HAVE to use unset() in order to help optimize the code for speed as just about anything you can do with alot of code can be done with a little code as well if you take the time to do a little research...I have over the years learned how to do things in many programming languages including C, C++, PHP, PERL...things that used to take me 100 lines of code and alot of CPU cycles to do I can now quite often do in 10-20 lines of code with alot less CPU usage...Anyway, someone else needs the computer here in the library now (they only have 3) so I will be going and will try to be back on for a little while monday to see that everything is going ok. Have fun all, Thanks again for all your help RL as well as OL J...
Elmseeker |
Recent GIDBlog
NARMY by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Optimizing your web server with Turck MMCache for PHP | JdS | Web Hosting Forum | 2 | 07-Jan-2004 07:48 |
| apache2 - php cgi fehler - schleife | inna | Apache Web Server Forum | 8 | 27-Nov-2003 09:55 |
| Automate a data change php form | mjfmn | MySQL / PHP Forum | 4 | 20-Oct-2003 09:37 |
| [Linux] Installing PHP --with-mcrypt | JdS | Web Hosting Forum | 0 | 20-Aug-2003 08:40 |
| All the big PHP script collections that matter | jrobbio | MySQL / PHP Forum | 5 | 06-Jun-2003 16:14 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The