What is PHP?
PHP is an extensible high level web language used for creating dynamical websites. It has typeless variables, thousands of functions, and a fast, svelte interface.
what is Perl?
Perl is a simple, high level programming language designed to produce scripts, create webpages, and using modules to extend its abilities. Perl also has typeless variables, user created modules, and documentation out the yin-yang.
Advantages of PHP
- Easily mixed with HTML, either embedded with it, or using it to parse HTML.
- Very easy to learn. PHP is similar to Java, C, C++, and Python.
- Uses less overhead, so PHP scripts run faster.
- More consistent code from site to site and version to version.
- Easily create and link hundreds of webpages.
Disadvantages of PHP
- A huge number of functions and modules. PHP has over 3000 functions in its main namespace, with lots of overlap between the functions.
- On very busy websites, not running it in CGI mode will cause memory bloat, and long response times.
- Inconsistent naming schemes between naming schemes.
- Character arrays cannot be interpolated into strings.
- No warnings automatically enabled.
Advantages of Perl
- More documentation.
- CPAN. ‘Nuff said.
- More secure. (This one is hotly debatable.)
- Lexical and dynamic scoping
- Useful for much more then just working webpages.
Disadvantages of Perl
- Which to use: mod_perl, CGI, FastCGI, SCGI, etc?
- Not as intuitive to use as PHP
- Not automatically integrable with SQL and its variants.
- Not designed strictly for webpages, with little modules directly created for web support.
- Horrible OOP structure. Perl has the worst OOP structure I have ever seen.
Although similar, a good web developer will know both PHP and Perl, as the two languages compliment each other in subtle ways. Both are powerful languages that can make web application programming, automation, and dynamic content a breeze to work with and develop. Indeed, I would say that learning both is crucial to the success of dynamic script driven sites, as both PHP and Perl have their advantages and disadvantages.


