Rather then just saying "PHP sucks" as some people perhaps would, here is a detailed case study of a commerical application of PHP, that shows the problem of PHP vs. more structured Programming languages such as Java and Perl:
Security
When installing PHP, make sure to go through php.ini with a very fine toothed comb! Here is the warning from the default php.ini:
;;;;;;;;;;; ; WARNING ; ;;;;;;;;;;; ; This is the default settings file for new PHP installations. ; By default, PHP installs itself with a configuration suitable for ; development purposes, and NOT for production purposes. ; For several security-oriented considerations that should be taken ; before going online with your site, please consult php.ini-recommended ; and http://php.net/manual/en/security.php.
--Wim