Jump to content
xisto Community
rantsh

Perl Vs Php Whats in your website?... and why?

Perl Vs PHP  

You do not have permission to vote in this poll, or see the poll results. Please sign in or register to vote in this poll.

Recommended Posts

Ok, so I've heard a lot of both languages, I've used php and I was learning Perl a while ago...If you had to choose between these 2 languages to develop a website, which one would you use and why?I'm attaching a poll in this message please vote

Share this post


Link to post
Share on other sites

Perl is a language that isnt based on just the web, Perl is a full command line language, and GUI can be added and tool kit is there and Perl can be used to program entire operating systems if it was needed to and infact is as a codebase on a Linux distrabution. Its pretty fast and can be as object oriented as you like which apparently makes it much easier to program in although im not in full agreement about that.Perl has CPAN for its modules so theres modules for litteraly everything from checking disk speed to AI bots brains and RSS feed readers. PHP is the new and upcoming language that more and more people seem to want to learn, its fast and optimised, logical and doesnt have as many pitfalls as perl. It was designed as web language but can be used elsehow but not very easily. The documentation for PHP is second to none its amazing.PHP is my personal favourite as I like the way it works and flows although from what ive used of perl its very logical.

Share this post


Link to post
Share on other sites

They are both useful for various purpoese. I prefere CGI (through perl) for setting cookies, but PHP for dealing with MySQL databases. If I had to pick one for webpages, I'd probably go with PHP simply because it was designed for webpages, can be embedded in webpages, and has various webpage features that perl doesn't.~Viz

Share this post


Link to post
Share on other sites

This has been discussed, quite intensively too.Languages are made for a purpose, and they usually do their purpose quite effectively. Perl has been around for a long time, and languages have taken it's ideas and used them in their language.PERL is in my opinion more powerful than PHP, it's string manipulation and ability to handle large amounts of data, file I/O, etc makes it very suitable for large scale applications, and quite a power commandline tool.PHP shares similarities, and can do the same thing, but if we took both languages to their extremes I would think PERL would come out on top.I'm more to using PHP than Perl for web development. Which is one of PHP purposes it was created for.Cheers,MC

Share this post


Link to post
Share on other sites

So up to now, although all of us recognize that PERL is very powerful, we stick to php... interesting... The reason I brought this topic up is because on one of my old jobs we were working with perl in a very intense fashion (meaning that we used PERL for almost anything).A little further in the past, I developed my thesis using mainly in php, and I found it very powerful and easy to use...Yet, as I spoke to one of my friends (old college teacher and debian lover/freak) he told me "PERL is the path to the future", so that made me think 'Is it? Are we at the door (can't think of a better english to describe the moment) of a major web developing change?'. Of course we're at the doors of a major standalone software developing revolution, since with the new multi-core processors and the fast evolution of High Performance computing, standalone software as we know it (at least I do) which is linear and not threaded is fastly dying to give path to a full set of techniques which involve threads and concurrence as our main thought when designing.But, does this apply to web development? are we going to have to abandon good old php because PERL is more efficient and secure????As you may notice these are a big bunch of crazy thought of a drowzy/sleepy programmer, but I really wish to know if I'm alone on this thoughts... Is php going to give way to PERL, or the other way around? or do you think they'll both continue advancing steadily for us to keep using them as we have always done?Please excuse me if I don't make any sense, or share your opinions if I do (actually you have more reasons to share your opinions if I don't make any sense). Either way, good luck to all, and I'll see you around...

Share this post


Link to post
Share on other sites

I don't have a great knowledge of Perl or PHP but as far as I know Perl is the complete language and it can also be used in web scripting. But PHP is purely for web development. PHP is very easy to learn and it is a good and cheap alternative of ASP/ASP.NET/JSP server side technologies. I will choose PHP between two of these.

Share this post


Link to post
Share on other sites

I believe PERL is paving the way for other scripting languages. Ruby, which is another scripting language is still struggling to make it a successor of PERL, from the sounds of it, Ruby is suppose to be better, but not too many people took onto it, so it's still trying to make it's way through the door. Maybe it's a similar affect that happened to C or C++.During PHP 3.0, I use to rewrite my CGI scripts/programs into PHP, not because I thought PHP was better, I just liked using PHP for web development and it was to help me learn PHP, prior to 3.0 however, I stayed with PERL, it just hadn't gain my interest then.I don't think a language will shine on top, because so many proefficient programmers out there can each shine with their language or choice. Recently I was impressed with a programmer who wrote an Assembler in VB, not that I didn't think VB was capable, his assembler worked just as well as other assemblers. I'm not even fond of VB, but I do get impressed by some of the work these programmers do with it.If we combined many different languages into an application, each being standalone using their own interpreter, would we be able to increase the performance or degrade it. This would be something I would like to find out. It may or may not affect the server load at all.This is probably the only reason why I stick with one or the other, however if the program scale is to be large, I would consider PERL.Cheers,MC

Share this post


Link to post
Share on other sites

MC, I can answer your question: it depends on what languages are being mixedand in what way. For example, hardware direct access in C++ can be done thorugh assembly functions if compiled separately, and if the assmebly functions are done well, it will be faster. However, generally, mixing BASIC languages with C languages slows the process down. Mixingdifferent interpreted languages also slows things down as multiple interpreters must be opened into memory. compiled mixtures work well if they are precompiled, like the C languages and Assembly, and if both elements were designed to work together and are more eficient on their on, and are merged into one program. Scripted languages largey dpeend on whther the interpreters are resident in memory, and whether one scripting language offers marked efficiancy increases in one task over another. Because there are so many variables, it is usually easier to just stick with one language, and for most programmers, even advanced ones, proves to be more efficient programs.~Viz

Share this post


Link to post
Share on other sites

I started using PHP when I noticed a book at the bookstore about it. It talked about Apache , MySQL, and PHP installation and very basic use. I started to learn right away. I was surprised how quickly I was picking everything up. Of course I had some limited programming encounters prior to the discovery of the book, but the book has set me on a new course.

In 1985, I got my first computer. It was ready to go for programming in BASIC. I printed "hello world!" a million times on my screen and even got to where I could program music into the computer.

In 1992, I took my first formal programing class. Turbo C! I didn't do as well in the class as I had hoped but I started to pick up the basics of all modern programming.

In 1995, I printed the source and output of the Indiana University Home Page. I went line by line until I understood every bit of HTML for that page. Shortly there after, I learned a little bit of JavaScript and made some engine displacement calculators and what not. Pretty simple scripts I must admit.

In 1999, I Downloaded and installed my first CGI script called Links (Gossamer Threads). As soon as I got the link indexer / search engine up and running, I started to notice that there were modifications that I wanted to add. The script was programmed entirely in Perl and the mods were manual find and replace or find and add. Having the mods as a roadmap as I started to moddify the script, I began learning a lot about Perl. I think that I could never write a full script in Perl with my current knowledge but what I learned helped me better understand PHP.

In 2003, I bought the PHP book that I have mention and started learning PHP. I have by no means mastered PHP but, I'm getting to where I can usually do what I want with it. The similarities between Perl and PHP are remarkable but that is also true about C. I have found PHP to be much easier to learn than Perl but I have very little interest in programming outside of the web now.

I was told by a friend of mine that is a very well paid free lance programmer that the language really doesn't matter. He's older now so his primary laguages are also older. He said that he tends to use fortran most often. He suggested that if the programmer knows the language well and is a good programmer, then he/she can program anything to do anything with any language. While many languages were design based on certain needs of the creators, the general abilities of all laguages are more or less the same. If a language doesn't contain the out of the box functionality that you require, then you'll simply have to write a more complex program.

My point is that there is no reason to think that any language will fall to extinction. There will always be a new flavor that is most popular but if a language as old as fortran is still being widely used, then it stands to reason that PHP and Perl will also survive.

For my money, I'll stick to PHP for the foreseeable future. Its easy to learn, easy to use, and currently has a lot of applications built on it.

vujsa

Share this post


Link to post
Share on other sites

I use PHP because I do not know Perl and I'm scared of the cgi-bin folder ^^ I haven't reached the borders of PHP yet, so I don't see a reason to learn Perl. I think PHP is a very easy to understand language and the best thing is that you can learn while you write. I just write and when I come across a function I need I look it up on php.net (usually they have the name I imagine) and then I can use it. If there is a usage problem I will usually find it in the comments (and additionally some handy scripts that are ready-to-use.)I think PHP is the way of the most, because it is just damn popular, you rather get PHP than Perl on a freehost and it's easier to learn.

Share this post


Link to post
Share on other sites

Well php has evolved very quickly in last few years. If you search for open source solutions alot of them have been done in PHP.but there are other options. Things like Ruby on Rails , Python and Plain old CGI (using C++)ASP.net and JSP are also good options ...but only if you have a big architecture and can afford the Hardware to support it(they make devlopment easy ..if not offer the best possible solution.)I think (and its strictly an opnion) PERL will die out sooner than PHP ...just cause of its hype...when does that happen ..i think within 5 years.wat will happen to LAMP ...guess they would have to have a P retronym language...:)

Share this post


Link to post
Share on other sites

PHP(*.php,*.php3) is Scripting(application)Language that easy to use and learn.It's open source. User can develop to use it.but it need to compile on server.ASP(*.asp,*.aspx) is Scripting(application)Language.iT'S DON'T open source.You need to pay license to use.

Share this post


Link to post
Share on other sites

I will prefer PHP.

There is no valid reason :o

 

I have never ever used Perl so I dont have any idea about Perl ...

 

However I have used PHP and learnt much of this ..

The good thing about PHP is that a hell lot of Free PHP Scripts are available at different website.

Due to the diversity in availability of PHP Scripts, u often end up having exactly the same thing which u had wanted.

 

However, Perl Scripts are also available at most places but relatively they are much much lesser than the PHP Scripts :P

 

Furthermore, as people have said that PHP is a pure Web Language and indeed a very powerful language :o

 

So I will prefer PHP ;)

 

 

**** All Appreciations and Criticisms are welcome ****

 

Regards :

Samya Khalid

Share this post


Link to post
Share on other sites

PHP vs Perl

Perl Vs Php

 

I know both languages extensively, the former out of sheer love, the later because of customers ( ;-) )

 

I restrict my view on Web programming, for PHP will never standas a serious contender outside this area.

 

Lack of orthogonality, lack of high level semantic primitives (curryfication, closures, scopes, contexts,...), faulty designs (for instance the poor hash/array PHP array data type), poor quality PEAR repository, have me definitely convinced that PHP is only good for micky mouse projects.

 

The fact that some good size projects may have seen the light does not prove otherwise.

 

After all, computer languages are T�ring.

 

So the point of chosing a language is not "will I be able to complete the task ?" (obviously you will if you are not trisomic), but "how efficiently will I be able to complete the task?"

 

Source code for many mid-size PHP projects (PHPBB, PHPMySQLADMIN, ...) is awful. Have a look for yourself, and be amazed.

 

"Patch over bugs" seems to be the standard "quality procedure" in PHP coding and litteracy.

 

Obviously at the end, it works... But only because it has to !

 

My experience in developing higly complex web applications in PHP has been a nightmare.

 

It has proven to be overkill time consuming compared to what the same thing done right in Perl combined with a profesional grade templating system like CGI::Forge or WWW::Forge (Franck PORCHER - Smart Technologies Tahiti - http://forums.xisto.com/no_longer_exists/).

 

So my definite answer, without a doubt, is "if you have to choose between PHP and Perl for Web programming"... Choose Perl, you will always win at the end.

 

I'm convinced that Perl is easier to learn than PHP, far more richer, far more powerful, and not restricted to Web programming.

 

Franck PORCHER

 

 

 

-reply by Franck PORCHER

Share this post


Link to post
Share on other sites

My PHP vs Perl Experience

Perl Vs Php

 

I first used Perl to write an AJAX chatroom back in 2006. Yep, people were doing AJAX even then, they just didn't know it was to be called that :)

 

Anyway, With anything over 100 simultaneous connections to the server the server loads went through the roof anf file locking started to fail. I therefore rewrote the time critical sections in C which vastly improved things.

 

After some years I decided to rewrite the chat from the bottom um in PHP. It can easily handle thousands of concurrent connections, file locking doesn't fail and since I started using PHP I have not had to recompile any code into C.

 

This is just one example. There are many other very trafficed servers I have worked on in PHP that perform vastly better than Perl. I know that Perl has been through a few revisions and is supposed to be much better, but I see no reason to go back when I can achieve anything I need quickly and easily in PHP.

 

-reply by Robin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.