PHP vs. PERL (Functional Comparison)??

From: Date: Sun, 16 Sep 2001 18:30:03 +0000
Subject: PHP vs. PERL (Functional Comparison)??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67513@lists.php.net to get a copy of this message
Hi; I am planning to implement a new site which will be using mysql db heavily, and I am in the middle of (and stuck:) deciding what I should use for implementation. I would definitely prefer Java Servlets, but it is very expensive to host servlets, so I am only comparing PHP vs. Perl. I have been hearing very good things about PHP for a long time, and I started reading the manual/tutorial posted on php.net. To be honest, I didn't see much difference from perl. It is almost identical (I have to admit, there are some practical advantages, but not a huge difference), even the syntax is almost same to perl. Comparing basic functional stuff: 1.Speed: If you use mod_perl or fastcgi kind of deals (which are based on threadding instead of forking), I don't think PHP is considerably faster than perl? Is that the case? 2.Database Connection: What is the BIG advantage of PHP here? Using DBI packages for perl, and fastcgi for db connection pooling, you can achieve the same thing, I guess. It just looks like PHP has some of these libraries embedded in the core language, but the idea is same--implementing the native db protocol over sockets? 3.Shared Memory, global variables, etc: I was expecting a better interface for this in PHP, and I was really disappointed to see that developers have to use O/S level shared memory. First of all, this is not available on Windows???? And, it is kind of messy and hard to use, especially when you compare this to Java's static variables. 4.Session Management: If you use files to manage sessions, same thing can be achieved in perl. Regarding in memory session management, as far as I know, FastCGI can share variables among sessions, so it shouldn't be hard to write a session manager in perl as well. 5.Architecture: I couldn't find any doc about how PHP works. And any answer to important questions, like -How does compilation process work? Does the PHP engine compile htmls first time a request is made to that html and use that compiled code later on(just like JSPs), or does it compile everytime? Is PHP engine an interpreter, jvm-like byte-code generator/executer or a compiler? -How does threadding work? How can you cache stuff, etc.? -What is the generic lifecycle of a request/response? 6. Embedding scripts in HTML: Well, I mean, this is similar to JSP, but what the hell, you can use <<AA ..... AA; syntax and embed any string you want at any point by mixing and matching HTML and perl code. I mean, yeah PHP is easier, but it is not considerably easier, I believe. I have been searching the internet to find some serious comparisons, but all I found was a stupid page which compares the syntax rather than functionality. As I said, I really need to start developing soon, and I would appreciate comments regarding this issue. Thanks in advance, Baho. __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/

« previous php.general (#67513) next »