I've only just started looking at PHP 3 days ago, and am already generating production code. Would love to see some open source perl-solutions with similar features. Perl to PHP is proving to be no big deal for me. I do php though, I'm forced to because of all the boards and shops written in php and demanded by clients. I don't recommend php to beginners because it takes the programmer another step away from what's actually happening (register globals is just the tip of it) so that (my observations only) many people do stuff but don't understand the underlying concept of http, client and server etc. I don't like the inconsisting function naming php, the missing closures and the fact that there are thousands of functions and many of them have confusing arguments etc pp. I personally prefer perl because it fits my style of thinking. php has those accelerators which give it an edge, perl has mod_perl which is not only very fast but also pretty much the mightiest thing around for apache-scriptlanguage-development. I think, they're pretty much at the same level if you just compare execution time. the extra process generation time for cgi will always result in a slower result. The speed-discussion is usually broken because people compare mod_php and cgi-scripts written in perl.
I use them both, but then, I use Macs and Windows without prejudice either. PHP Both PHP and Perl are excellent languages, with a rich history and excellent community support. If you go through my Learning Perl book, which a reasonable person can do in about 40 hours if they do all of the exercises, maybe you have a Perl solution in two weeks. If you know PHP but not Perl, maybe you can have a PHP solution tonight. PHP is great for dynamic web pages, API frameworks and being the engine room behind some of the largest hitters on the web like WordPress. That doesn't help you if you don't know Perl yet, though. For PHP, they have an entirely different outlook on globals for example, to use it in a function, you have to define the global directly within the function to access it (there are exceptions )Īnother is the complete absence of sub's in PHP. Perl is great for system administration/automation, text processing and data manipulation. The other is the management of global variables. What I like about perl is there are visual differences between scalars, associative arrays, and list arrays. You will find many things different in perl, but many the same. I came into PHP after learning perl and found PHP easy to learn, in fact, it was originally described to me as "perl, but in the page." It's funny you raise this question, most coders argue the other way around. Speed has always been argued in favor of PHP, but anything I've ever read or tested seems to show it as an insignificant difference.