Re: [PHP] PHP vs PERL? HOPE THIS HELPS
>That's a really interesting link. Thanks! No problem, my pleasure I was quite shocked to see how PHP performed gcc still rocks though Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs PERL - thanks
Got a lot of good replies, and info! Thanks, JP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs PERL? HOPE THIS HELPS
http://www.bagley.org/~doug/shootout/index2.shtml http://www.bagley.org/~doug/shootout/bench/ary3/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs PERL?
Richard Davey wrote: Hello John, Thursday, April 22, 2004, 2:37:30 PM, you wrote: JN> Uh-oh, does that mean an Atheist has to use ASP??? ;) You meant satanist, surely? ;) (or a masochist!) Ah, yes. My apologies, you're right. Evil has to stick together. An Atheist wouldn't use anything since he/she wouldn't believe it existed. ;) -- *** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \/ /__ _ _| |__ ___ __ ___ _ __ * 716.856.9675 * * | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] PHP vs PERL?
Hello John, Thursday, April 22, 2004, 2:37:30 PM, you wrote: JN> Uh-oh, does that mean an Atheist has to use ASP??? ;) You meant satanist, surely? ;) (or a masochist!) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP vs PERL? (Seriously OT Now....)
> Uh-oh, does that mean an Atheist has to use ASP??? ;) > [/snip] > > And if so, what must a Buddhist use? Lisp, of course. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP vs PERL? (Seriously OT Now....)
[snip] Uh-oh, does that mean an Atheist has to use ASP??? ;) [/snip] And if so, what must a Buddhist use? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs PERL?
John Nichel wrote: John W. Holmes wrote: From: <[EMAIL PROTECTED]> What would be the technical arguments of PHP vs. PERL? Depends if you catholic or not. Use what you know. ---John Holmes... Uh-oh, does that mean an Atheist has to use ASP??? ;) oh d..n i hate ASP. -- Raditha Dissanayake. - http://www.radinks.com/print/upload.php SFTP, FTP and HTTP File Upload solutions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs PERL?
John W. Holmes wrote: From: <[EMAIL PROTECTED]> What would be the technical arguments of PHP vs. PERL? Depends if you catholic or not. Use what you know. ---John Holmes... Uh-oh, does that mean an Atheist has to use ASP??? ;) -- *** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \/ /__ _ _| |__ ___ __ ___ _ __ * 716.856.9675 * * | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs PERL?
[EMAIL PROTECTED] wrote: What would be the technical arguments of PHP vs. PERL? Thanks, JP Well, Perl is older and has four letters in it's name. PHP has youth on it's side. Perl is a Camel and PHP is a bird (Thrush or Roadrunner...I don't know my birds). Perl is misspelled more often than PHP. Perl is Larry, and PHP is Rasmus. -- *** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \/ /__ _ _| |__ ___ __ ___ _ __ * 716.856.9675 * * | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs PERL?
From: <[EMAIL PROTECTED]> > What would be the technical arguments of PHP vs. PERL? Depends if you catholic or not. Use what you know. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs PERL?
[EMAIL PROTECTED] wrote: What would be the technical arguments of PHP vs. PERL? This is a religious question. Thanks, JP -- Raditha Dissanayake. - http://www.radinks.com/print/upload.php SFTP, FTP and HTTP File Upload solutions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP vs PERL?
[snip] What would be the technical arguments of PHP vs. PERL? [/snip] That is like asking what would be the technical arguements of an 10" miter saw and a 12" miter saw. Both are tools, each is better suited to some things and not as well suited for others. In some projects we have several different languages applied...som because of legacy situations, some because that was the choice at the time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs PERL?
What would be the technical arguments of PHP vs. PERL? Thanks, JP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs Perl for system scripts (non-web)
Paul Chvostek <[EMAIL PROTECTED]> wrote... : > > I have to write a swath of code to manage system-related stuff based on > database content. Scripts will be run as root by cron, and determine > what they have to do via user interaction and SQL lookups. Functions > will include manipulation of system configuration files, legacy text > file configs, and some signalling with posix_kill. On some of the > machines in question, there won't even be an httpd installed, so I'd be > building a php as a standalone binary, and running it with shell magic > and a -q option. I've done this kind of stuff in the past in smaller > environments, and it seems to work nicely. PHP can easily do all that, probably even easier that with Perl. Perl is somewhat too painful to write scripts in. For my needs, i whether use PHP or Ruby for stand-alone apps. Ruby is less flexible than PHP but its "pure" OOP and I often need to resort to it. > I'm more comfortable writing stuff in PHP. I use PHP alot more, and I > find the resultant code more readable and easier to maintain. You answered yourself again - if you are more comfortable with PHP then why hassle with painful Perl? > Aside > from Perl's ubiquity and the dubious advantage of future flexibility by > using Perl's DBI interface to talk to different SQL servers (I'm using > MySQL at the moment), are there any compelling reasons I should write > system stuff in Perl rather than PHP? PHP natively works quite well with mySQL, thus its another reason to use it. -- Maxim Maletsky [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs Perl for system scripts (non-web)
I'm more comfortable writing stuff in PHP. I use PHP alot more, and I find the resultant code more readable and easier to maintain. Aside from Perl's ubiquity and the dubious advantage of future flexibility by using Perl's DBI interface to talk to different SQL servers (I'm using MySQL at the moment), are there any compelling reasons I should write system stuff in Perl rather than PHP? If you have complicated tasks there may be more Perl examples on the internet, and that would be a vote for Perl. But then again, i once tried to translate Perl to PHP and that was unexpectedly easy. Except for the crypt() function which turned out to be different. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs Perl for system scripts (non-web)
I have to write a swath of code to manage system-related stuff based on database content. Scripts will be run as root by cron, and determine what they have to do via user interaction and SQL lookups. Functions will include manipulation of system configuration files, legacy text file configs, and some signalling with posix_kill. On some of the machines in question, there won't even be an httpd installed, so I'd be building a php as a standalone binary, and running it with shell magic and a -q option. I've done this kind of stuff in the past in smaller environments, and it seems to work nicely. I'm more comfortable writing stuff in PHP. I use PHP alot more, and I find the resultant code more readable and easier to maintain. Aside from Perl's ubiquity and the dubious advantage of future flexibility by using Perl's DBI interface to talk to different SQL servers (I'm using MySQL at the moment), are there any compelling reasons I should write system stuff in Perl rather than PHP? Thanks. -- Paul Chvostek <[EMAIL PROTECTED]> Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs. Perl/Mason
Everyone, I was wondering if there are any perl/php programmers that have used mason. I am trying to get the advantages/disadvantages of each? I am pro PHP, but my does is pro perl. What does everyone think about the benefits of one over the other? Thanks, Ray signature.asc Description: This is a digitally signed message part
RE: [PHP] PHP vs. PERL (Functional Comparison)??
hallelujah...first time i've seen someone else mention here docs, and being rasmus, not a bad person to make the mention ;-) -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 12:17 AM To: speedboy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] PHP vs. PERL (Functional Comparison)?? > > ie. don't necessarily use 1 file per block, create functions that are > > defined in a single file and call those instead of including a new file. > > How do you echo your html, do you put the html in your functions and > escape the double quotes? There is some extra load there echoing all the > html? echo HTML? I do this: HTML stuff I drop out of PHP mode to display raw HTML. If I have a lot of HTML with a lot of PHP variables tossed in, I do: Or sometimes simply: HTML stuff and some more HTML stuff. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs. PERL (Functional Comparison)??
> > ie. don't necessarily use 1 file per block, create functions that are > > defined in a single file and call those instead of including a new file. > > How do you echo your html, do you put the html in your functions and > escape the double quotes? There is some extra load there echoing all the > html? echo HTML? I do this: HTML stuff I drop out of PHP mode to display raw HTML. If I have a lot of HTML with a lot of PHP variables tossed in, I do: Or sometimes simply: HTML stuff and some more HTML stuff. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs. PERL (Functional Comparison)??
> ie. don't necessarily use 1 file per block, create functions that are > defined in a single file and call those instead of including a new file. How do you echo your html, do you put the html in your functions and escape the double quotes? There is some extra load there echoing all the html? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs. PERL (Functional Comparison)??
> I mean, for example say you have > an html that consists of blocks... Making every block > an include is clean, but this time, php engine has to > read all of these includes, and parse the html+php and > compile/run php everytime a request is made??? I am > not sure about this? I wouldn't say it was clean to split everything out into separate files. I tend to do something more like: tags tags tags More tags More tags ie. don't necessarily use 1 file per block, create functions that are defined in a single file and call those instead of including a new file. If you really do want to separate it, have a look at a cacheing templating system like Smarty which lets you keep this per-file separation but it caches the combined logic. http://www.phpinsider.com/php/code/Smarty/ -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs. PERL (Functional Comparison)??
> ??? I didn't get this? Aren't these pre-forked > processes handle requests using threads internally? > Say you configure apache to pre-fork 5 server > processes, what you are saying implies that you can > only handle 5 concurrent requests?? can you please > explain this more? That's exactly what it means. Apache on Unix is non-threaded. > Actually, I was asking the low-level information, I > mean something like web server receives the request, > hands this over to mod_php, that requests a thread > from the worker threads, so on so forth... Well, since there are no threads involved here there is no pool of worker threads or anything like that. You simply have a process that grabs a requests, branches off to mod_php/mod_perl and sends the result back. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs. PERL (Functional Comparison)??
> Threading instead of forking? None of these do > either. Apache is a > pre-forking multi-process server and both PHP and > mod_perl are part of > these pre-forked processes. Neither mod_perl nor > PHP do any threading nor forking. ??? I didn't get this? Aren't these pre-forked processes handle requests using threads internally? Say you configure apache to pre-fork 5 server processes, what you are saying implies that you can only handle 5 concurrent requests?? can you please explain this more? > Again, the architectural difference makes this a lot > easier to do in a > single-process JVM scenario. Note that such a > single-process JVM > architecture which maintains static objects is very > hard to scale cleanly. Actually, as far as I know, you can configure tomcat or other servlet engines to start multiple servlet engines (JVMs) and the dispatcher code makes sure that every user goes to the same JVM for subsequent requests. So, you can scale with this architecture... > The lifecycle of a request/response matches the > lifecycle of an HTTP request/response. Actually, I was asking the low-level information, I mean something like web server receives the request, hands this over to mod_php, that requests a thread from the worker threads, so on so forth... Anyways, once again, thanks for your time... Baho. __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs. PERL (Functional Comparison)??
> Why on earth would you prefer java servlets? Hmm... Let's see;Java is a full-fledge, totally OOP and awesome programming language but not a scripting language. Speed (will be mentioning this later), having total control over whatever you want (exception handling, db pooling, caching, syncrhonization, threadding, etc. etc.), ease of use, etc. etc. I mean, come on;) > veins as well), therefore its imho much easier > to do web programming with php. That is what I saw, but as I said, I didn't see a lot of difference between perl and php, I mean, C++ and perl are very different, likewise java and perl or other languages, but PHP has a very similar syntax. > FYI, JSP is the slowest to my knowledge. The first request is slow since JSPs are compiled into servlets (java classes)... But, then it is not bad... In fact, I saw some comparisons showing that servlets are kicking ass! But, again, I mean, this all depends on how you design/configure the system, one simple example:java used to crap out (before 1.2, don't know the latest situation, but heard that it is better) after 40-50 threads per jvm, so if you have more than 40-50 concurrent requests, starting couple of servlet engines on different jvms and using apache dispatching improves the speed a lot! Likewise, tricks like using caching, staying away from classic traps (i.e. using StringBuffers instead of Strings when needed), minimizing garbage collection, etc. etc. Also, with the introduction of JIT and hotspot capable JREs, java is doing pretty well these days...You can check comparisons at rasin servlet engine page. > No, its not available on Windows, but then > again, why on earth would you want to use Windows? ;) Same here;) I am supposed to implement this sytem on windows 2000...But I totally agree! I would definitely prefer linux or other unix systems over windows... If you really need > shm on windows, submit a patch, hint, its just a mmap() :) Well, what I meant was something like ease of sharing data in java (using static variables) and dealing with synchronization is extremely easy in java... Also, FastCGI is not that hard as far as I could see, but I am not an expert in that area;) > You can use Files or SHM management, or write > your own custom session backend using for example MySQL. Using a database in the backhand is what huge sites are doing, but they have huge boxes to run these databases and very fast network infrastructure. Do you think overhead of serializing/de-serializing session for every request via the database is a lot? Files again is??? I don't know... As you specified SHM is not very nice either (dealing with synchronization might be messy). > No. Its compile and execute everytime ??? Don't you think using perl and printing out html from the code is faster than this? I mean, parsing the whole html doesn't seem very good???Actually, this is what I was scared of. I mean, for example say you have an html that consists of blocks... Making every block an include is clean, but this time, php engine has to read all of these includes, and parse the html+php and compile/run php everytime a request is made??? I am not sure about this? > Yes, but do you want your web designer going > through your perl code Hmmm, good point, hehehehe... Thanks a lot for your time and I appreciate your comments. Baho... __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs. PERL (Functional Comparison)??
> 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? Threading instead of forking? None of these do either. Apache is a pre-forking multi-process server and both PHP and mod_perl are part of these pre-forked processes. Neither mod_perl nor PHP do any threading nor forking. > 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? No difference. > 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. Again, the architectural difference makes this a lot easier to do in a single-process JVM scenario. Note that such a single-process JVM architecture which maintains static objects is very hard to scale cleanly. > 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. Probably true. > 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? PHP is a 2-stage interpreted language. First pass generates opcodes, second pass executes the opcodes. Various add-on caches and optimizers can cache the opcodes and thus skip the interpreter step. Doesn't usually win you a whole lot unless you have quite complex logic in your pages though. The interpreter is pretty fast. There is no threading in PHP. The web server provides the base thread/process architecture. The lifecycle of a request/response matches the lifecycle of an HTTP request/response. > 6. Embedding scripts in HTML: Well, I mean, this is > similar to JSP, but what the hell, you can use < . 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. Probably not. > 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. Basically any language can be used to write web apps. There is nothing in PHP you can't do in Perl, ASP, Cold Fusion, Python or JSP. PHP just happens to package things together in a easy to comprehend way and everything you read about PHP is geared towards the Web problem whereas in the case of more general-purpose scripting languages it can be confusing trying to figure out how to approach the web problem. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs. PERL (Functional Comparison)??
On Sun, 16 Sep 2001, Bora Paksoy wrote: > 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. > Why on earth would you prefer java servlets? > 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. > PHP is a much "cleaner" language than Perl, ie, it doesn't have the same abiguities that plague Perl (print reverse split /\s+/, "H P A J";) and is much more akin to C in many ways. Also, PHP was written and intended for the web (it can be used in other veins as well), therefore its imho much easier to do web programming with php. > 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? > The speed is comparable between the two languages, but then again if you count all the extra Perl libraries you have to call in to achieve the same results, php starts to win. FYI, JSP is the slowest to my knowledge. > 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? > The PHP way is slightly faster, that's it though (yeah, yeah, I know database independence, but if you want your code to run with any speed you'll tune your sql for the individual database anyway, loosing the necessary portability). > 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. > No, its not available on Windows, but then again, why on earth would you want to use Windows? ;) If you really need shm on windows, submit a patch, hint, its just a mmap() :) The same applies for perl btw... I have a feeling your not talking about Shared memory by the way, but rather sessions, which you can do via the built-in PHP sessioning support, see below. Shared memory is usually only a good idea (outside of the session scope) when you want to communicate with other programs/processes. Using it on high traffic sites is also not a good idea. > 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. > You can use Files or SHM management, or write your own custom session backend using for example MySQL. > 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? No. Its compile and execute everytime, however if you use one of the Cache's mentioned below its simply an execute each time. JSP btw is slower despite the fact that it compiles the stuff ahead of time. > -How does threadding work? How can you cache stuff, > etc.? you can cache your scripts using the commercial (but higher quality) Zend Cache (www.zend.com) or the (free) APC Cache (apc.communityconnect.com). > -What is the generic lifecycle of a request/response? > zend.com should have some information on this. > 6. Embedding scripts in HTML: Well, I mean, this is > similar to JSP, but what the hell, you can use < . 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. > Yes, but do you want your web designer going through your perl code and messing with that section alone? Its much easier to maintain the PHP code in this respect (you could use a templating engine in Perl of course, but that would s
[PHP] PHP vs. PERL (Functional Comparison)??
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
Re: [PHP] PHP vs Perl question
> I'm pretty new to programming - besides JavaScript, PHP is really the first > language I've used. > I'm just wondering, and I'm sure you all would know - should I learn Perl? > Is it considered a necessity for a web developer to know Perl, or is it not > a worthwhile endeavor, considering how easy PHP is to learn and use? Someone > I know told me not to bother, but I just wanted a second opinion. > (BTW - if you think it is worthwhile to learn Perl, what is a good book to > begin with?) Yeah, you should learn Perl. Programming Perl by O'Reilly is the best book out there for that. Then check out the Perl Cookbook by O'Reilly after that. Perl is much more powerful than PHP, but PHP is easier to integrate in to web pages. But not by much. Perl is like a swiss army chainsaw. You can use it for pretty much anything, data manipulation wise. That's where it really shines. PHP has gotten better with PHP4's release, but Perl's syntax is much more lenient and intuitive, making it much easier to do things in Perl than it is in PHP. -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP vs Perl question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'd go for it. Perl can be messy, but it is also quite powerful and doesn't HAVE to be messy. It is EVERYWHERE both in terms of availability and use. But most of all, it is a fun language to play with... and if you do any system admin it is an indispensable tool. I recommend _Beginning Perl_ from Wrox over _Learning Perl_ by O'Reilly, but only by a hair. Both are good. c -BEGIN PGP SIGNATURE- Version: PGP 7.0.3- signed for information authentication and security Comment: Key ID: 0x51046CFD iQA/AwUBO1YhadaLYehRBGz9EQJcIACgw3pQ3O4fhIbIQUOA84JLclcTOq0AoN5f Q9Em4S5fJ/h7eS6cpYigOLtZ =VYmH -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP vs Perl question
I personally try and avoid using Perl when I can. Perl is difficult to learn to write proficient code in. Perl's moto is, "There is More Than One Way to Do It" which also mean there are more than a million ways to mess up. Depending upon the programmer Perl can be a write-only language. You can even look at your own Perl code and think "What in the world, did I write this?" My mind is cluttered with enough garbage so I will not learn anymore Perl than necessary. Long live modern languages! Perl is a necessary evil for a web developer, so I recommend O'Reilly's Learning Perl, http://www.oreilly.com/catalog/lperl3/ -Original Message- From: Tom Malone [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 3:03 PM To: PHP Users Subject: [PHP] PHP vs Perl question I'm pretty new to programming - besides JavaScript, PHP is really the first language I've used. I'm just wondering, and I'm sure you all would know - should I learn Perl? Is it considered a necessity for a web developer to know Perl, or is it not a worthwhile endeavor, considering how easy PHP is to learn and use? Someone I know told me not to bother, but I just wanted a second opinion. (BTW - if you think it is worthwhile to learn Perl, what is a good book to begin with?) Thank you! Tom Malone -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs Perl question
I do love perl, even if I mostly code with PHP, but I use perl for stuff that run with a crontab (a script that run on every x date or hours), I know that you can do that with PHP now too, but Perl is a really great and funny language to learn, the best regular expression that I ever use (I still use the perl regular expresion in PHP), just for that you should learn they language. Once you know a language it's easy to change or learn an other one, the best thing should be learn what you need and get good on this one and if you need an other language then the stuff that you have learned will help you up to learn you new stuff. Book: Learning Perl from O'reilly, O'reilly have the better good, amazing book for Perl. Tom Malone wrote: > > I'm pretty new to programming - besides JavaScript, PHP is really the first > language I've used. > I'm just wondering, and I'm sure you all would know - should I learn Perl? > Is it considered a necessity for a web developer to know Perl, or is it not > a worthwhile endeavor, considering how easy PHP is to learn and use? Someone > I know told me not to bother, but I just wanted a second opinion. > (BTW - if you think it is worthwhile to learn Perl, what is a good book to > begin with?) > > Thank you! > Tom Malone > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP vs Perl question
I'm pretty new to programming - besides JavaScript, PHP is really the first language I've used. I'm just wondering, and I'm sure you all would know - should I learn Perl? Is it considered a necessity for a web developer to know Perl, or is it not a worthwhile endeavor, considering how easy PHP is to learn and use? Someone I know told me not to bother, but I just wanted a second opinion. (BTW - if you think it is worthwhile to learn Perl, what is a good book to begin with?) Thank you! Tom Malone -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP vs Perl security
both are cool. never heard of any holes as such, Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Jeff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 11:26 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP vs Perl security Hi. Are there any known/posssible security issues with PHP using SSL? I'm trying to figure out if it would be better to user Perl or PHP based on their security features/flaws. I'm sure there's holes in both, but which one has the bigger hole...? Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP vs Perl security
Hi. Are there any known/posssible security issues with PHP using SSL? I'm trying to figure out if it would be better to user Perl or PHP based on their security features/flaws. I'm sure there's holes in both, but which one has the bigger hole...? Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs Perl
someone recently posted a link to a benchmark test that was done...there's never an absolute, but i do remember php w/zend as pretty much whipping the competition...search the mailing list for the link if you want to see for yourself... -jack David Hynes wrote: > > Hi, > > I'm new to PHP (well I used it years ago), and have been using Perl ever > since. > > Someone told me that PHP is a lot more efficient than Perl, is this true ? I > am developing a fairly large website using a MySQL database running on a > cobalt RAQ3 server and so the speed of the scripts must be kept to a > minimum. I have already started the site using Perl, but would it benefit > me to change to PHP4. > > Thanks, > David. > > --- > Fed202 Solutions > www.fed202solutions.com > Mobile : 07779 293368 > --- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs Perl
David Hynes wrote: > Hi, > > I'm new to PHP (well I used it years ago), and have been using Perl ever > since. > > Someone told me that PHP is a lot more efficient than Perl, is this true ? I > am developing a fairly large website using a MySQL database running on a > cobalt RAQ3 server and so the speed of the scripts must be kept to a > minimum. I have already started the site using Perl, but would it benefit > me to change to PHP4. Normally we try to keep our speeds to a maximum, which is why we use PHP. :) It would not benefit you to change if you already know perl and have your project done in it. If it's a real project with a deadline, just do it with what you know best. That's probably the best route. BUT... if you've time, dig into PHP4. Maybe it can help on this, or maybe it'll help in the future. It really just depends on what you want to do, and what you're comfortable with. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP vs Perl
Hi, I'm new to PHP (well I used it years ago), and have been using Perl ever since. Someone told me that PHP is a lot more efficient than Perl, is this true ? I am developing a fairly large website using a MySQL database running on a cobalt RAQ3 server and so the speed of the scripts must be kept to a minimum. I have already started the site using Perl, but would it benefit me to change to PHP4. Thanks, David. --- Fed202 Solutions www.fed202solutions.com Mobile : 07779 293368 --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php vs perl
> When Jason says 'especially when your note using the cgi' he means the > cgi version of PHP (I think) in preference to installing PHP as an > apache module. Almost, yes - I literally meant the 'common gateway interface', due to the fact that the webserver spawns the requested script/program outside of it's own process. I don't know the technical detals involved in doing this, but I'm guessing that in general, it'd incur more overhead on the system than the same code would if it was parsed by the already-running httpd process. jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php vs perl
On Thursday 15 February 2001 08:03, Scott Mebberson wrote: > When Jason says 'especially when your note using the cgi' he means the > cgi version of PHP (I think) in preference to installing PHP as an > apache module. ...just as using mod_perl is better than perl as CGI -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) I saw God - and she was black. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php vs perl
When Jason says 'especially when your note using the cgi' he means the cgi version of PHP (I think) in preference to installing PHP as an apache module. ""Jason Brooke"" <[EMAIL PROTECTED]> wrote in message 04ad01c0970f$927eeff0$0100a8c0@jb">news:04ad01c0970f$927eeff0$0100a8c0@jb... > > Is there any reason why php is better than perl for shopping carts > > and/or product catalogs? > > > > Thanks, > > Jeff > > > It's hard to just come out and say that php is better than perl for shopping > carts because there's too many factors to take into consideration. > > If you were a person who'd never used either, I'd guess that php might be > better to use because the essential ingredients are pretty much already > included with php, such as session handling, form and url data processing, > and a wide variety of database functions. > > That's not to say the same things aren't fairly easy to plug right into perl > by way of readily-available modules, but it's probably a bit of extra work, > especially for the beginner. Someone who already uses perl would likely have > libraries for these things already installed/handled anyway though. > > I think the syntax might be a little easier to understand in php too, > although it's sure to be a personal preference thing to a large extent. > > To me, the bottom line is go with the one you feel most > productive/comfortable with. They're both about as cross-platform portable > as each other (I think?) and both are pretty robust under heavy load, > especially when you're not using the cgi. > > jason > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php vs perl
> Is there any reason why php is better than perl for shopping carts > and/or product catalogs? > > Thanks, > Jeff It's hard to just come out and say that php is better than perl for shopping carts because there's too many factors to take into consideration. If you were a person who'd never used either, I'd guess that php might be better to use because the essential ingredients are pretty much already included with php, such as session handling, form and url data processing, and a wide variety of database functions. That's not to say the same things aren't fairly easy to plug right into perl by way of readily-available modules, but it's probably a bit of extra work, especially for the beginner. Someone who already uses perl would likely have libraries for these things already installed/handled anyway though. I think the syntax might be a little easier to understand in php too, although it's sure to be a personal preference thing to a large extent. To me, the bottom line is go with the one you feel most productive/comfortable with. They're both about as cross-platform portable as each other (I think?) and both are pretty robust under heavy load, especially when you're not using the cgi. jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php vs perl
Is there any reason why php is better than perl for shopping carts and/or product catalogs? Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]