PHP has several 'directives' that control its behavior, many have little bearing on the actual performance of your site, but there are some that have a great impact on performance and there are others that have security implications. This will give you an overview of those directives and provide you with several methods for adjusting those directives on your site.
Methods: All (user scripts, Windows registry, php.ini, .htaccess or httpd.conf) This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server.
Methods: System (php.ini or httpd.conf)
Methods: PerDir (php.ini, .htaccess or httpd.conf)
Methods: System (php.ini, or httpd.conf), since PHP4.3.5
Methods: All (user scripts, Windows registry, php.ini, .htaccess or httpd.conf)