![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Apr 2005
Posts: 17
Rep Power: 0
![]() |
php and perl/cgi
what are the advantages for using php over perl/cgi (and vice versa)
is there really much of a difference? thanks. |
|
|
|
|
|
#2 |
|
Professional Programmer
|
PERL is a unix scripting language adapted for web programming. PHP was built to be a web programming language. PERL is more powerfull and can do alot of tasks non web related, like any other shell scripting. You can do that with PHP, but PERL is more suited for it.
Because the programming language and syntax are easier, and you don't have any screwy permission problems like you can get in PERL, I reccomend using PHP over perl for web programming |
|
|
|
|
|
#3 |
|
Programming Guru
![]() ![]() ![]() |
I second PHP for web programming.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#4 | |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Quote:
|
|
|
|
|
|
|
#5 |
|
Programming Guru
![]() ![]() ![]() |
Yeah... really no one good language for everything. The problem / assignment usually dictates which language would be best suited.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#6 |
|
Hobbyist Programmer
Join Date: Sep 2004
Posts: 207
Rep Power: 5
![]() |
IR is right no one langauge is good for everything thats why we have different ones.
__________________
_______________________________ BlazingWolf |
|
|
|
|
|
#7 | |
|
Professional Programmer
|
Quote:
|
|
|
|
|
|
|
#8 |
|
Programmer
Join Date: Jul 2005
Location: Germany
Posts: 69
Rep Power: 4
![]() |
Hi,
i seriously doubt that. Could you please state why php is better for webstuff ?
__________________
-= C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do succeed, you will blow away your whole leg. =- Bjarne Stroustrup |
|
|
|
|
|
#9 |
|
Professional Programmer
|
Because PHP was built as a web programming language. The structure, built in functions, and everything else is made for internet applications, it's the main purpose of php.
PERL, on the other hand, has been around since the 80s and was, and still is, a unix scripting language. somwhere along the line people decided to allow web servers to execute the perl scripts for interactive web pages. The main purpose of perl, has always been to script, they just adopted it because it was the best solution at the time. |
|
|
|
|
|
#10 |
|
Programmer
Join Date: Jul 2005
Location: Germany
Posts: 69
Rep Power: 4
![]() |
Hi,
thanks for the details. As you say perl is around some time. The same goes for cgi. cgi again is a layer that allows one to use what ever language you whish to accomplish some dynamics. I agree that perl was not made for web-programming, but that does not mean that it's bad for such things. PHP is a scripting language as well. Just because the zend-engine and the parser does some housekeeping for you which you'd have to do by hand in perl, it does not mean that php owns perl. Because aside from this little tricks, php has nothing to offer. And as the template-concept is widely used perl has some major advanteges over php as it was made for textprocessing. See the template engines in php and compare them to one written in perl. But when it comes to real work, aside from just outputting some values like greetings and such, perl offers way more possibilities to structur and organize your code. And as there is something called fast-cgi the performance-difference isn't that bad. perl is a mature and well designed language and as such i prefer it over php for real web-applications. Let's say shop-systems or cms or even a front-end for an ai-based resource-optimizer .. controlling loadbalancers for highperformance servers. One can hardly do that in php. But as said, every language may have it's right of existence even brainfuck. ![]()
__________________
-= C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do succeed, you will blow away your whole leg. =- Bjarne Stroustrup |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|